php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27754 mktime() reports wrong time for day of change to daily savings time CET->CEST
Submitted: 2004-03-29 10:28 UTC Modified: 2004-03-29 10:43 UTC
From: martin at tradex dot sk Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.3.5 OS: FreeBSD 4.9-RELEASE i386
Private report: No CVE-ID: None
 [2004-03-29 10:28 UTC] martin at tradex dot sk
Description:
------------
mktime() reports wrong time in PHP version 4.3.5 under special circumstances(4.3.4 works well). It reports a wrong negative unixtime when requesting mktime() for March 28, 2004 = the day of CET/CEST timezone change (2:00 AM -> 3:00 AM). The wrong time is reported in mktime interval from (0, 0, 0, 03, 28, 2004); to (1, 59, 59, 03, 28, 2004);

Tested on: FreeBSD 4.9, PHP 4.3.5
Timezone: CET / CEST


Reproduce code:
---------------
echo mktime(0, 0, 0, 03, 28, 2004) . "\n" . mktime(1, 59, 59, 03, 28, 2004);


Expected result:
----------------
1080428400
1080435599

this result is the correct result from PHP 4.3.4

Actual result:
--------------
-7262
-3601

this is the wrong result from PHP 4.3.5

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-29 10:43 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 12:01:32 2024 UTC