#23478 [Bgs]: date() -> mktime bug
| From: | rdzil at atlas dot cz | Date: | Mon, 05 May 2003 06:35:08 +0000 |
| Subject: | #23478 [Bgs]: date() -> mktime bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39057@lists.php.net to get a copy of this message | ||
ID: 23478
User updated by: rdzil at atlas dot cz
Reported By: rdzil at atlas dot cz
Status: Bogus
Bug Type: Date/time related
Operating System: Windows ME
PHP Version: 4.3.1
New Comment:
thanks and sorry, in my country change winter/summer time in other
days...
Previous Comments:
------------------------------------------------------------------------
[2003-05-04 16:18:44] derick@php.net
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.
...
------------------------------------------------------------------------
[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