Index: Tests/basic.eagle ================================================================== --- Tests/basic.eagle +++ Tests/basic.eagle @@ -1113,13 +1113,16 @@ # the DateTime structure seem to always return local time, even when # string value clearly indicates otherwise (i.e. the trailing "Z", # indicating UTC). # expr {round([object invoke System.Data.SQLite.SQLiteConvert ToUnixEpoch \ - "2012-01-01 12:00:00Z"])} + [set dateTime [object invoke -create -alias DateTime ParseExact \ + "2012-01-01 12:00:00Z" [getDateTimeFormat] null AdjustToUniversal]]])} +} -cleanup { + unset -nocomplain dateTime } -constraints {eagle command.object monoBug42 System.Data.SQLite} -result \ -{1325390400}} +{1325419200}} ############################################################################### runTest {test data-1.21 {SQLiteConvert ToUnixEpoch (Local)} -body { # @@ -2500,19 +2503,20 @@ setupDb [set fileName data-1.53.db] "" Ticks Utc BindAllAsText } -body { sql execute $db "CREATE TABLE t1(x);" list [sql execute $db "INSERT INTO t1 (x) VALUES(?);" \ - [list param1 DateTime [set dateTime [object invoke DateTime Parse \ - "2000.02.29 13:59:58.1234567Z"]]]] [sql execute -execute reader \ - -format list $db "SELECT x FROM t1;"] + [list param1 DateTime [set dateTime [object invoke -create \ + DateTime ParseExact "2000-02-29 13:59:58.1234567Z" \ + [getDateTimeFormat] null AdjustToUniversal]]]] [sql execute \ + -execute reader -format list $db "SELECT x FROM t1;"] } -cleanup { cleanupDb $fileName unset -nocomplain dateTime db fileName } -constraints {eagle command.object monoBug28 monoBug42 command.sql\ -compile.DATA SQLite System.Data.SQLite} -result {1 630874007980000000}} +compile.DATA SQLite System.Data.SQLite} -result {1 630874295981234567}} ############################################################################### runTest {test data-1.54 {bind function to a connection} -setup { set fileName data-1.54.db