fix timestamp support
[awesomized/ext-ion] / tests / Timestamp.phpt
index cb50cf05d0a7b74f82961a308fef2cf0690b552d..6b263ecbb522716a0ca2fb6a40092e69c4b9e556 100644 (file)
@@ -2,6 +2,8 @@
 ion\Timestamp
 --EXTENSIONS--
 ion
+--INI--
+date.timezone=CET
 --FILE--
 TEST
 <?php
@@ -22,32 +24,56 @@ DONE
 --EXPECTF--
 TEST
 caught empty
-object(ion\Timestamp)#%d (2) {
+object(ion\Timestamp)#%d (5) {
   ["precision"]=>
   int(7)
   ["format"]=>
   string(7) "Y-m-d\T"
+  ["date"]=>
+  string(26) "2021-12-07 14:08:51.000000"
+  ["timezone_type"]=>
+  int(1)
+  ["timezone"]=>
+  string(6) "+00:00"
 }
 string(11) "2021-12-07T"
-object(ion\Timestamp)#%d (2) {
+object(ion\Timestamp)#%d (5) {
   ["precision"]=>
   int(7)
   ["format"]=>
   string(7) "Y-m-d\T"
+  ["date"]=>
+  string(26) "2021-12-07 14:08:51.000000"
+  ["timezone_type"]=>
+  int(1)
+  ["timezone"]=>
+  string(6) "+00:00"
 }
 string(11) "2021-12-07T"
-object(ion\Timestamp)#%d (2) {
+object(ion\Timestamp)#%d (5) {
   ["precision"]=>
   int(23)
   ["format"]=>
   string(11) "Y-m-d\TH:iP"
+  ["date"]=>
+  string(26) "2020-10-01 00:00:00.000000"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "CET"
 }
-string(22) "2020-10-01T00:00+00:00"
-object(ion\Timestamp)#%d (2) {
+string(22) "2020-10-01T00:00+02:00"
+object(ion\Timestamp)#%d (5) {
   ["precision"]=>
   int(7)
   ["format"]=>
   string(7) "Y-m-d\T"
+  ["date"]=>
+  string(26) "2000-10-01 00:00:00.000000"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "CET"
 }
 string(11) "2000-10-01T"
 DONE