php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31430 Hour is lost
Submitted: 2005-01-06 17:13 UTC Modified: 2005-01-06 19:48 UTC
From: mne at nm dot ru Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.8 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mne at nm dot ru
New email:
PHP Version: OS:

 

 [2005-01-06 17:13 UTC] mne at nm dot ru
Description:
------------
Between March, 26 and 27, 2005 1 hour is lost

Reproduce code:
---------------
<?php

for($i=1111852800; $i<1111914000; $i+=3600)
  echo '<B>i='.$i.'</B>; '.date('d F Y H:i:s', $i).'<BR>';

?>

Expected result:
----------------
i=1111852800; 26 March 2005 19:00:00
i=1111856400; 26 March 2005 20:00:00
i=1111860000; 26 March 2005 21:00:00
i=1111863600; 26 March 2005 22:00:00
i=1111867200; 26 March 2005 23:00:00
i=1111870800; 27 March 2005 00:00:00
i=1111874400; 27 March 2005 01:00:00
i=1111878000; 27 March 2005 02:00:00
i=1111881600; 27 March 2005 03:00:00
i=1111885200; 27 March 2005 04:00:00
i=1111888800; 27 March 2005 05:00:00
i=1111892400; 27 March 2005 06:00:00
i=1111896000; 27 March 2005 07:00:00
i=1111899600; 27 March 2005 08:00:00
i=1111903200; 27 March 2005 09:00:00
i=1111906800; 27 March 2005 10:00:00
i=1111910400; 27 March 2005 11:00:00

Actual result:
--------------
i=1111852800; 26 March 2005 19:00:00
i=1111856400; 26 March 2005 20:00:00
i=1111860000; 26 March 2005 21:00:00
i=1111863600; 26 March 2005 22:00:00
i=1111867200; 26 March 2005 23:00:00
i=1111870800; 27 March 2005 00:00:00
i=1111874400; 27 March 2005 01:00:00
i=1111878000; 27 March 2005 03:00:00
i=1111881600; 27 March 2005 04:00:00
i=1111885200; 27 March 2005 05:00:00
i=1111888800; 27 March 2005 06:00:00
i=1111892400; 27 March 2005 07:00:00
i=1111896000; 27 March 2005 08:00:00
i=1111899600; 27 March 2005 09:00:00
i=1111903200; 27 March 2005 10:00:00
i=1111906800; 27 March 2005 11:00:00
i=1111910400; 27 March 2005 12:00:00

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-06 19:48 UTC] mgf@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.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 13:01:30 2024 UTC