diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
| commit | fd5a0b31640419ca63d1ddeaffd6d3cf2a741814 (patch) | |
| tree | bfd17d84c5181d7b98d7d66f56573f4fc897e31c /ext/date/tests/bug52454.phpt | |
| parent | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (diff) | |
| download | php-upstream/5.3.5.tar.gz | |
Imported Upstream version 5.3.5upstream/5.3.5
Diffstat (limited to 'ext/date/tests/bug52454.phpt')
| -rw-r--r-- | ext/date/tests/bug52454.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/date/tests/bug52454.phpt b/ext/date/tests/bug52454.phpt new file mode 100644 index 000000000..e2a94dc5b --- /dev/null +++ b/ext/date/tests/bug52454.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #52454 (Relative dates and getTimestamp increments by one day) +--FILE-- +<?php +date_default_timezone_set('Europe/London'); + +$endOfWeek = new DateTime('2010-07-27 09:46:49'); +$endOfWeek->modify('this week +6 days'); + +echo $endOfWeek->format('Y-m-d H:i:s')."\n"; +echo $endOfWeek->format('U')."\n"; + +/* Thar she blows! */ +echo $endOfWeek->getTimestamp()."\n"; + +echo $endOfWeek->format('Y-m-d H:i:s')."\n"; +?> +--EXPECT-- +2010-08-01 09:46:49 +1280652409 +1280652409 +2010-08-01 09:46:49 |
