diff options
-rw-r--r-- | ext/date/tests/date_time_point-inherited.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/date/tests/date_time_point-inherited.phpt b/ext/date/tests/date_time_point-inherited.phpt new file mode 100644 index 0000000000..e35540753c --- /dev/null +++ b/ext/date/tests/date_time_point-inherited.phpt @@ -0,0 +1,25 @@ +--TEST-- +Tests for DateTimePoint. +--INI-- +date.timezone=Europe/London +--FILE-- +<?php +$tz = new DateTimeZone("Asia/Tokyo"); +$current = "2012-12-27 16:24:08"; + +echo "\ngetTimezone():\n"; +$v = date_create_point($current); +$x = $v->getTimezone(); +var_dump($x->getName()); + +echo "\ngetTimestamp():\n"; +$v = date_create_point($current); +$x = $v->getTimestamp(); +var_dump($x); +?> +--EXPECT-- +getTimezone(): +string(13) "Europe/London" + +getTimestamp(): +int(1356625448) |