Bug #14282 Updated: wrong strtotime calculation with timezones -0100 and +0100
| From: | derick@php.net | Date: | Sun, 02 Dec 2001 11:35:48 +0000 |
| Subject: | Bug #14282 Updated: wrong strtotime calculation with timezones -0100 and +0100 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72264@lists.php.net to get a copy of this message | ||
ID: 14282
Updated by: derick
Reported By: jan@horde.org
Status: Closed
Bug Type: Date/time related
Operating System: any
PHP Version: 4.1.0
New Comment:
This was not fixed yet in CVS. It is now however.
Derick
Previous Comments:
------------------------------------------------------------------------
[2001-12-02 02:57:16] zak@php.net
Thanks - Fixed in CVS
------------------------------------------------------------------------
[2001-11-29 09:38:54] jan@horde.org
This code:
<?php
$now = date('r');
$stamp = strtotime($now);
$conv = date('r', $stamp);
echo "$now\n$conv";
?>
produces this output:
Thu, 29 Nov 2001 15:24:21 +0100
Sun, 25 Nov 2001 12:24:21 +0100
This is the fix:
--- parsedate.y~ Thu Nov 15 15:33:41 2001
+++ parsedate.y Thu Nov 29 15:28:52 2001
@@ -255,7 +255,7 @@
yySeconds = $5;
yyMeridian = MER24;
yyHaveZone++;
- if ($6 < -100 || $6 > 100) {
+ if ($6 <= -100 || $6 >= 100) {
yyTimezone = -$6 % 100 + (-$6 / 100) * 60;
} else {
yyTimezone = -$6 * 60;
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14282&edit=1