#23478 [Opn->Bgs]: date() -> mktime bug
| From: | derick@php.net | Date: | Sun, 04 May 2003 21:18:45 +0000 |
| Subject: | #23478 [Opn->Bgs]: date() -> mktime bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39042@lists.php.net to get a copy of this message | ||
ID: 23478
Updated by: derick@php.net
Reported By: rdzil at atlas dot cz
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Windows ME
PHP Version: 4.3.1
New Comment:
We are happy to tell you that you just discovered Daylight Savings
Time. For more information see:
http://webexhibits.org/daylightsaving/b.html
Instead of using mktime/date consider using gmmktime and gmdate which
do
not suffer from DST.
...
Previous Comments:
------------------------------------------------------------------------
[2003-05-04 15:58:35] rdzil at atlas dot cz
$test = "1048978801";
echo date('d.m.Y H:i:s',$test); // OUT: 30.03.2003 00:00:01
echo "<br>";
echo date('d.m.Y H:i:s',$test + (1*(60*60))); // $test+1 hour * OUT:
30.03.2003 01:00:01
echo "<br>";
echo date('d.m.Y H:i:s',$test + (2*(60*60))); // $test+2 hour - BAD *
OUT: 30.03.2003 03:00:01
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23478&edit=1