Adding a test that is just micro-seconds for sqlserver, marking usec ones as skip.
[clsql.git] / tests / test-time.lisp
index 174ab75041811060e9d6861e1394980d931109e2..39cc93061bfe5e59520480a82f6bb3022e0e3c23 100644 (file)
          )))
   #.(format-time nil (parse-timestring "2008-09-09T14:37:29-04:00") :format :iso))
 
+;;;This test gets at the databases that only support miliseconds,
+;;; not microseconds.
+(deftest :time/cross-platform/msec
+    (with-dataset *cross-platform-datetest*
+      (let ((time (parse-timestring "2008-09-09T14:37:29.423")))
+       (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 "2008-09-09T14:37:29.423") :format :iso))
+
 (deftest :time/cross-platform/usec/no-tz
     (with-dataset *cross-platform-datetest*
       (let ((time (parse-timestring "2008-09-09T14:37:29.000213")))