php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45103 mktime shows wrong date at 2007-03-25
Submitted: 2008-05-27 07:39 UTC Modified: 2008-05-27 07:44 UTC
From: SimonSimCity at web dot de Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.2CVS-2008-05-27 (snap) OS: Windows XP
Private report: No CVE-ID: None
 [2008-05-27 07:39 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-27 07:44 UTC] 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.

That\'s because it\'s exactly the same moment in time.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 21:01:33 2024 UTC