#45103 [Opn->Bgs]: mktime shows wrong date at 2007-03-25
| From: | derick@php.net | Date: | Tue, 27 May 2008 07:44:52 +0000 |
| Subject: | #45103 [Opn->Bgs]: mktime shows wrong date at 2007-03-25 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-125292@lists.php.net to get a copy of this message | ||
ID: 45103
Updated by: derick@php.net
Reported By: SimonSimCity at web dot de
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Windows XP
PHP Version: 5.2CVS-2008-05-27 (snap)
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.
That's because it's exactly the same moment in time.
Previous Comments:
------------------------------------------------------------------------
[2008-05-27 07:39:48] SimonSimCity at web dot de
Description:
------------
mktime shows the same time at 2007-03-25 02:00:00 and 2007-03-25
03:00:00
Reproduce code:
---------------
echo mktime(2, 0, 0, 3, 25, 2007);
echo "<br />";
echo mktime(3, 0, 0, 3, 25, 2007);
Expected result:
----------------
1174784400
1174788000
Actual result:
--------------
1174784400
1174784400
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45103&edit=1