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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: SimonSimCity at web dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 08:01:29 2025 UTC