php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23478 date() -> mktime bug
Submitted: 2003-05-04 15:58 UTC Modified: 2003-05-05 01:35 UTC
From: rdzil at atlas dot cz Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.1 OS: Windows ME
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: rdzil at atlas dot cz
New email:
PHP Version: OS:

 

 [2003-05-04 15:58 UTC] rdzil at atlas dot cz
$test = "1048978801";
echo date('d.m.Y H:i:s',$test); // OUT: 30.03.2003 00:00:01
echo "<br>";
echo date('d.m.Y H:i:s',$test + (1*(60*60))); // $test+1 hour * OUT: 30.03.2003 01:00:01
echo "<br>";
echo date('d.m.Y H:i:s',$test + (2*(60*60))); // $test+2 hour - BAD * OUT: 30.03.2003 03:00:01

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-04 16:18 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.

...
 [2003-05-05 01:35 UTC] rdzil at atlas dot cz
thanks and sorry, in my country change winter/summer time in other days...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 10:01:28 2025 UTC