svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/lib/tm2unixtime.c trunk/ext/date/lib/tm2unixtime.c
trunk/ext/date/tests/bug52454.phpt
| From: | Derick Rethans | Date: | Mon, 30 Aug 2010 16:25:52 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/lib/tm2unixtime.c trunk/ext/date/lib/tm2unixtime.c trunk/ext/date/tests/bug52454.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-63394@lists.php.net to get a copy of this message | ||
derick Mon, 30 Aug 2010 16:25:52 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=302890
Log:
- Fixed bug #52454 (Relative dates and getTimestamp increments by one day)
Bug: http://bugs.php.net/52454 (Assigned) Relative dates and
getTimestamp increments by one day
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/date/lib/tm2unixtime.c
U php/php-src/trunk/ext/date/lib/tm2unixtime.c
A php/php-src/trunk/ext/date/tests/bug52454.phpt
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2010-08-30 15:40:36 UTC (rev 302889)
+++ php/php-src/branches/PHP_5_3/NEWS 2010-08-30 16:25:52 UTC (rev 302890)
@@ -41,6 +41,8 @@
(Felipe)
- Fixed bug #52468 (wddx_deserialize corrupts integer field value when left
empty). (Felipe)
+- Fixed bug #52454 (Relative dates and getTimestamp increments by one day).
+ (Derick)
- Fixed bug #52436 (Compile error if systems do not have stdint.h)
(Sriram Natarajan)
- Fixed bug #52433 (Call to undefined method mysqli::poll() - must be static).
Modified: php/php-src/branches/PHP_5_3/ext/date/lib/tm2unixtime.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/lib/tm2unixtime.c 2010-08-30 15:40:36 UTC (rev 302889)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/tm2unixtime.c 2010-08-30 16:25:52 UTC (rev 302890)
@@ -444,6 +444,7 @@
time->sse = res;
time->sse_uptodate = 1;
+ time->have_relative = time->relative.have_weekday_relative =
time->relative.have_special_relative = 0;
}
#if 0
Modified: php/php-src/trunk/ext/date/lib/tm2unixtime.c
===================================================================
--- php/php-src/trunk/ext/date/lib/tm2unixtime.c 2010-08-30 15:40:36 UTC (rev 302889)
+++ php/php-src/trunk/ext/date/lib/tm2unixtime.c 2010-08-30 16:25:52 UTC (rev 302890)
@@ -444,6 +444,7 @@
time->sse = res;
time->sse_uptodate = 1;
+ time->have_relative = time->relative.have_weekday_relative =
time->relative.have_special_relative = 0;
}
#if 0
Added: php/php-src/trunk/ext/date/tests/bug52454.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/bug52454.phpt (rev 0)
+++ php/php-src/trunk/ext/date/tests/bug52454.phpt 2010-08-30 16:25:52 UTC (rev 302890)
@@ -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