In ODBC backend, avoid going through the common lisp universal time
[clsql.git] / tests / test-time.lisp
index 374ad9503fa9c5bac2285c86ec44b427f221087d..158ac9ce0d820d6cb476c86f48e9336e45bffbd2 100644 (file)
     #.(iso-timestring (parse-timestring "2008-09-09T14:37:29.000278-04:00"))
     #.(iso-timestring (parse-timestring "2008-09-09T14:37:29.000278-04:00")))
 
+(deftest :time/historic-datetimes
+  (with-dataset *cross-platform-datetest*
+    (let ((time (parse-timestring "1800-09-09T14:37:29")))
+      (clsql-sys:insert-records :into [datetest]
+                                :attributes '([testtime])
+                                :values (list time))
+      (let ((testtime
+              (first (clsql:select [testtime]
+                       :from [datetest] :flatp t
+                       :where [= [testtime] time] ))))
+        (format-time nil (parse-timestring testtime) :format :iso)
+        )))
+  #.(format-time nil (parse-timestring "1800-09-09T14:37:29") :format :iso))
+
 ))
 
 
 
+
+