php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15620 problem with 2002-03-31
Submitted: 2002-02-19 06:58 UTC Modified: 2002-02-19 07:10 UTC
From: martinradu at hotmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.1.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: martinradu at hotmail dot com
New email:
PHP Version: OS:

 

 [2002-02-19 06:58 UTC] martinradu at hotmail dot com
<?
$srez= date ("d-m-Y", mktime (0,0,0,3,1+29,2002));
echo "<br>".$srez;
$srez= date ("d-m-Y", mktime (0,0,0,3,1+30,2002));
echo "<br>".$srez;

echo phpinfo();
?>

The result is 
30-03-2002
30-03-2002 
and should be 
30-03-2002
31-03-2002

Please tell us how can we solve this problem

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-19 07:00 UTC] derick@php.net
Not a bug, it's daylight savings time. Use gmdate and gmmktime.

Derick
 [2002-02-19 07:10 UTC] hholzgra@php.net
... or "mktime(12,0,0,...)"
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 13:01:28 2025 UTC