X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=datetime.lisp;fp=datetime.lisp;h=ac71fa472841a383ca62ea89a24aebe2062d0eec;hp=4a4dbe2e321feae2789864b0d657c82759a9a1c6;hb=ffa469ca8554ae12f2a5e297e8a0880d784b1f12;hpb=98d7b650aa611a0de537ace581cde47c66071af3 diff --git a/datetime.lisp b/datetime.lisp index 4a4dbe2..ac71fa4 100644 --- a/datetime.lisp +++ b/datetime.lisp @@ -68,6 +68,11 @@ (t (format t "~,2F ~A" val unit)))) +(defconstant +posix-epoch+ + (encode-universal-time 0 0 0 1 1 1970 0)) + +(defun posix-time-to-utime (time) + (+ time +posix-epoch+)) ;;;; Daylight Saving Time calculations