X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Ftime.lisp;h=ea5667fe785b03b51abd4d8c9bc3d87a9f33b2d6;hp=0f8d5e235f0e75ad6fc4fd7787aacf8b721f35c9;hb=e75e62c7127f074ef2b2add3d2850c42dfaf590e;hpb=fc58e4fb7d908985389c86adf57ddee6c1dde5d2 diff --git a/sql/time.lisp b/sql/time.lisp index 0f8d5e2..ea5667f 100644 --- a/sql/time.lisp +++ b/sql/time.lisp @@ -67,7 +67,9 @@ (defun %print-wall-time (time stream depth) (declare (ignore depth)) - (format stream "#" (format-time nil time))) + (if *print-escape* + (format stream "#" (format-time nil time)) + (format-time stream time :format :pretty))) (defstruct (duration (:constructor %make-duration) (:print-function %print-duration)) @@ -81,8 +83,10 @@ (defun %print-duration (duration stream depth) (declare (ignore depth)) - (format stream "#" - (format-duration nil duration :precision :second))) + (if *print-escape* + (format stream "#" + (format-duration nil duration :precision :second)) + (format-duration stream duration :precision :second))) (defstruct (date (:constructor %make-date) (:print-function %print-date)) @@ -90,7 +94,9 @@ (defun %print-date (date stream depth) (declare (ignore depth)) - (format stream "#" (format-date nil date))) + (if *print-escape* + (format stream "#" (format-date nil date)) + (format-date stream date :format :pretty))) );eval-when @@ -1054,9 +1060,8 @@ with the given options" (* 60 minute) (* 60 60 hour)))) 1000000) - (declare (ignore sec-new)) (multiple-value-bind (mjd-new sec-new) - (floor sec (* 60 60 24)) + (floor sec-new (* 60 60 24)) (if destructive (progn (setf (time-mjd date) (+ mjd mjd-new day)