php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41731 Date/Time Issue for November 2007
Submitted: 2007-06-18 20:01 UTC Modified: 2007-06-18 20:03 UTC
From: jiggilo at gmail dot com Assigned:
Status: Not a bug Package: Calendar related
PHP Version: 5.2.3 OS: MAC
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jiggilo at gmail dot com
New email:
PHP Version: OS:

 

 [2007-06-18 20:01 UTC] jiggilo at gmail dot com
Description:
------------
Adding 1 or 2 days to a string to time of November 3rd, 2007 reproduces the same output.  86400 seconds = 24 hours.

Reproduce code:
---------------
<?php
	echo date("Y-n-j", (1194062400 + 86400)) . '<br />';
	echo date("Y-n-j", (1194062400 + 172800));
?>

Expected result:
----------------
2007-11-4
2007-11-5

Actual result:
--------------
2007-11-4
2007-11-4

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-18 20:03 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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC