X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2FTimestamp.phpt;h=88ca90f0d1fdee7709b1dd6740acec2340e31a18;hb=HEAD;hp=e92905bbfd7229c5f47187cf7260359f82a96fd3;hpb=ac7822dd9dd0d5cf0855df8a750468d453bc3053;p=awesomized%2Fext-ion diff --git a/tests/Timestamp.phpt b/tests/Timestamp.phpt index e92905b..88ca90f 100644 --- a/tests/Timestamp.phpt +++ b/tests/Timestamp.phpt @@ -21,6 +21,7 @@ var_dump($t=new Timestamp(Timestamp\Precision::Min, datetime:"2020-10-01"),(stri $t->setTimezone(new DateTimeZone("Europe/Helsinki")); var_dump((string) $t); var_dump($t=new Timestamp(Timestamp\Precision::Day, "!Y-m", "2000-10"),(string)$t); +var_dump($t=new Timestamp(Timestamp\Precision::MinTZ, Timestamp\Format::MinTZ, "2000-10-20T11:11CET"),(string)$t); var_dump(ion\unserialize(ion\serialize(clone new ion\Timestamp(ion\Timestamp\Precision::Sec, DateTime::RFC3339, "1971-02-03T04:05:06Z")))); ?> DONE @@ -80,6 +81,19 @@ object(ion\Timestamp)#%d (5) { string(3) "CET" } string(11) "2000-10-01T" +object(ion\Timestamp)#%d (5) { + ["precision"]=> + int(151) + ["format"]=> + string(11) "Y-m-d\TH:iP" + ["date"]=> + string(26) "2000-10-20 11:11:00.000000" + ["timezone_type"]=> + int(2) + ["timezone"]=> + string(3) "CET" +} +string(22) "2000-10-20T11:11+01:00" object(ion\Timestamp)#%d (3) { ["precision"]=> int(55)