php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15466 fucntion date returns same date with to different timestamps with 86400 sec dif
Submitted: 2002-02-09 10:57 UTC Modified: 2003-07-01 16:05 UTC
From: Webmaster at cdmw dot de Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.0.6 OS: Windows95
Private report: No CVE-ID: None
 [2002-02-09 10:57 UTC] Webmaster at cdmw dot de
Hi all,

look to this:

print date("Y-m-d",1004220001)."<br>";
print date("Y-m-d",1004306401);

Both will return "2001-10-28" but there are 86400 seconds (one day) difference.

Hope i could help...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-09 10:59 UTC] derick@php.net
October 28th has 25 hours.

Derick
 [2003-07-01 14:56 UTC] dongiobenve at tin dot it
Ok, but:

echo date("Y-m-d g:i:s I", 1067205600)."<p>";
echo date("Y-m-d g:i:s I", 1067205600 + 86400)."<p>";

return this output:

2001-10-28 12:00:01
2001-10-28 11:00:01

It's wrong!
 [2003-07-01 16:05 UTC] pollita@php.net
1067205600 is nowhere near 2001, I don't see any 1/0 for the daylight savings flag, nor do your <p> tags show in your "output".

When reporting a bug, please be kind enough to provide the ACTUAL output of your reproducing code and not something you decided to make up.

As to your original report, knowing what time zone you are in would also be extremely helpful.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 11:01:30 2024 UTC