diff options
Diffstat (limited to 'ext/date/tests/date-set-timestamp.phpt')
| -rw-r--r-- | ext/date/tests/date-set-timestamp.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/date/tests/date-set-timestamp.phpt b/ext/date/tests/date-set-timestamp.phpt new file mode 100644 index 0000000..c799b36 --- /dev/null +++ b/ext/date/tests/date-set-timestamp.phpt @@ -0,0 +1,15 @@ +--TEST-- +DateTime::setTimestamp() +--FILE-- +<?php +date_default_timezone_set('Europe/Oslo'); +$d = new DateTime( '@1217184864' ); +echo $d->format( "Y-m-d H:i e\n" ); + +$d = new DateTime(); +$d->setTimestamp( 1217184864 ); +echo $d->format( "Y-m-d H:i e\n" ); +?> +--EXPECT-- +2008-07-27 18:54 +00:00 +2008-07-27 20:54 Europe/Oslo |
