Coverage report: /home/ellis/comp/core/lib/obj/time/util.lisp
Kind | Covered | All | % |
expression | 0 | 32 | 0.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; util.lisp --- Time Utils
8
;; from hunchentoot/util.lisp - these variants are more portable than the
9
;; local.lisp alternatives.
10
(defun rfc-1123-date (&optional (time (get-universal-time)))
11
"Generates a time string according to RFC 1123. Default is current time.
12
This can be used to send a 'Last-Modified' header - see
13
HUNCHENTOOT::HANDLE-IF-MODIFIED-SINCE."
15
(second minute hour date month year day-of-week)
16
(decode-universal-time time 0)
17
(format nil "~A, ~2,'0d ~A ~4d ~2,'0d:~2,'0d:~2,'0d GMT"
18
(svref +day-names+ day-of-week)
20
(svref +month-names+ (1- month))
26
(defun iso-time (&optional (time (get-universal-time)))
27
"Returns the universal time TIME as a string in full ISO format."
28
(multiple-value-bind (second minute hour date month year)
29
(decode-universal-time time)
30
(format nil "~4,'0d-~2,'0d-~2,'0d ~2,'0d:~2,'0d:~2,'0d"
31
year month date hour minute second)))