]> granicus.if.org Git - php/commitdiff
- Added test file that I forgot to commit.
authorDerick Rethans <derick@php.net>
Mon, 30 Aug 2010 16:47:46 +0000 (16:47 +0000)
committerDerick Rethans <derick@php.net>
Mon, 30 Aug 2010 16:47:46 +0000 (16:47 +0000)
ext/date/tests/bug52454.phpt [new file with mode: 0644]

diff --git a/ext/date/tests/bug52454.phpt b/ext/date/tests/bug52454.phpt
new file mode 100644 (file)
index 0000000..e2a94dc
--- /dev/null
@@ -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