added some generic postegres code to send times to the database as iso8601
[clsql.git] / sql / time.lisp
index 32c10b70227f3dfc1950d3a459b8f1b1e506677d..4e8b6af25ce6c6128bc192d837b3952d25416746 100644 (file)
@@ -852,6 +852,9 @@ with the given options"
            (if stream
                (write-string string stream)
              string)))
+       (:iso8601 
+         (format stream "~4,'0D-~2,'0D-~2,'0DT~2,'0D:~2,'0D:~2,'0D.~DZ"
+                 year month day hour minute second usec))
         (t
          (format stream "~2,'0D~A~2,'0D~A~2,'0D~A~2,'0D~A~2,'0D~A~2,'0D.~6,'0D"
                  year date-separator month date-separator day