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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 07:01:29 2024 UTC