RegressionTests__TimeAndDateTest.st
changeset 1227 d303d4c8b01d
parent 1226 b5123dd5c3da
child 1229 881b11022fea
--- a/RegressionTests__TimeAndDateTest.st	Fri Nov 07 20:13:15 2014 +0100
+++ b/RegressionTests__TimeAndDateTest.st	Fri Nov 07 20:45:54 2014 +0100
@@ -595,11 +595,27 @@
     self assert:d2 asDate isLeapYear not.
     self assert:(d2 - d1) days = 366.
 
+    d1 := Timestamp newDay:1 month:1 year:1540.
+    d2 := Timestamp newDay:1 month:1 year:1541.   
+    self assert:d1 asDate isLeapYear.
+    self assert:d2 asDate isLeapYear not.
+    self assert:(d2 - d1) days = 366.
+
     "/ local time vs. utc time
     l := Timestamp newDay:1 month:1 year:1940.
     u := UtcTimestamp newDay:1 month:1 year:1940.
     self assert:(l asUtcTimestamp - u asUtcTimestamp) asSeconds = Timestamp now utcOffset.
 
+    "/ tz time vs. utc time
+    u := Timestamp readFrom:'20000102T123000Z'.
+    l := Timestamp readFrom:'20000102T123000+02'.  
+    self assert:(u - l) asSeconds = 7200.
+
+    "/ tz time vs. utc time
+    u := UtcTimestamp readFrom:'20000102T123000Z'.
+    l := UtcTimestamp readFrom:'20000102T123000-02'.  
+    self assert:(u - l) asSeconds = -7200.
+
     "
      self new test_13_timestampQueries
     "