#40861 [Asn->Csd]: strtotime() behaviour has changed

From: Date: Wed, 11 Apr 2007 14:37:41 +0000
Subject: #40861 [Asn->Csd]: strtotime() behaviour has changed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-111359@lists.php.net to get a copy of this message
ID: 40861 Updated by: derick@php.net Reported By: eheien at heli-one dot ca -Status: Assigned +Status: Closed Bug Type: Date/time related Operating System: Windows 2003 and XP PHP Version: 5.2.1 Assigned To: derick New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-03-21 09:41:21] derick@php.net Reverted that patch, as it was incorrect. ------------------------------------------------------------------------ [2007-03-21 00:25:45] iliaa@php.net This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2007-03-20 09:07:49] eheien at heli-one dot ca Description: ------------ strtotime() fails when supplied with both a negative and positive argument. This worked in php 5.0.5 and php 4.x.x. +- = - ++ = + -- = + Reproduce code: --------------- $offset = -60; $ts = strtotime('2000-01-01 12:00:00'); $result = date("Y-m-d H:i:s", strtotime("+$offset minutes", $ts)); echo $result; Expected result: ---------------- 2000-01-01 11:00:00 Actual result: -------------- 1970-01-01 01:00:00 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40861&edit=1

« previous php.bugs (#111359) next »