php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38586 mktime has some problem for some day.
Submitted: 2006-08-25 00:01 UTC Modified: 2006-08-25 07:12 UTC
From: ziyunxiao at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.1.5 OS: WiNXP
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: ziyunxiao at gmail dot com
New email:
PHP Version: OS:

 

 [2006-08-25 00:01 UTC] ziyunxiao at gmail dot com
Description:
------------
day Oct 30 has 90000 seconds a day. 
I only test year 2005,2006,2007 in Version is php 5.1.4 and 5.1.6. I didn't install 5.1.5.
the result is right on php 4.4.3

Reproduce code:
---------------
<?
$st=mktime(0, 0, 0, 10, 30,2007);
$st1=mktime(0, 0, 0, 10, 31,2007);
echo "seconds:".($st1 - $st)."<br>";
?>

Expected result:
----------------
seconds:86400

Actual result:
--------------
seconds:90000

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-25 07:12 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.

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 09:01:30 2025 UTC