#16429 [Com]: strtotime fails when crossing Daylight Saving Time
| From: | ilia at prohost dot org | Date: | Mon, 19 Aug 2002 21:25:06 +0000 |
| Subject: | #16429 [Com]: strtotime fails when crossing Daylight Saving Time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17244@lists.php.net to get a copy of this message | ||
ID: 16429
Comment by: ilia@prohost.org
Reported By: sveinp@basefarm.no
Status: Verified
Bug Type: Date/time related
Operating System: Solaris/Linux
PHP Version: 4.3.0-dev
New Comment:
Works fine for me as well, with PHP 4.3.0-dev <1 hour old
Thu, 4 Apr 2002 09:28:00 -0500
Sat, 30 Mar 2002 00:00:00 -0500
Previous Comments:
------------------------------------------------------------------------
[2002-08-19 17:22:12] rasmus@php.net
Works for me. I get:
Thu, 4 Apr 2002 09:28:00 -0800
Sat, 30 Mar 2002 00:00:00 -0800
------------------------------------------------------------------------
[2002-08-19 17:18:54] sniper@php.net
Oops..the original script by sveinp@basefarm.no works now..but the
example by msopacua@idg.nl does not..
------------------------------------------------------------------------
[2002-08-19 16:36:44] sniper@php.net
So it was fixed by some change. Not bogus, I could reproduce it.
------------------------------------------------------------------------
[2002-08-19 15:15:55] msopacua@idg.nl
Please reset to open.
If this was to be closed it, would be 'close' and not 'bogus', as Jani
already confirmed it.
Today's checkout, HEAD and STABLE:
mdev@server21 ~/cvs/php4
$ sapi/cli/php -q
<?php
$today = mktime(9, 28, 0, 4, 4, 2002);
print date("r", $today) . "\n";
print date("r", strtotime("last saturday", $today)) . "\n";
?>
Thu, 4 Apr 2002 09:28:00 +0200
Fri, 29 Mar 2002 23:00:00 +0100
mdev@server21 ~/cvs/php-4.2.3
$ sapi/cli/php -q
<?php
$today = mktime(9, 28, 0, 4, 4, 2002);
print date("r", $today) . "\n";
print date("r", strtotime("last saturday", $today)) . "\n";
?>
Thu, 4 Apr 2002 09:28:00 +0200
Fri, 29 Mar 2002 23:00:00 +0100
------------------------------------------------------------------------
[2002-08-19 13:55:20] iliaa@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
I've just tried this on PHP 4.3.0-dev on linux and the function appears
to work fine.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16429
--
Edit this bug report at http://bugs.php.net/?id=16429&edit=1