|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11152 different date() values on different platforms and versions
Submitted: 2001-05-28 06:48 UTC Modified: 2001-05-28 21:35 UTC
From: bignat at mail dot com Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.5 OS: Linux RedHat 7.0/Win 98
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.
Bug Type:
From: bignat at mail dot com
New email:
PHP Version: OS:


 [2001-05-28 06:48 UTC] bignat at mail dot com
on windows 98 (apache module, 4.0.5):

echo date('j',86400);
// it's: 2

on Linux (apache module, 4.0.5):

echo date('j',86400);
// it's: 1 !!!

please decide whether is 1 or 2 !
(it occurs in time calculations,
when I try to find out the number
of days between two dates.. quite

I cannot change it with every new
version.. and it's quite important
in finances, acccountability etc..

Anyway, your work it's great!
And PHP it's so easy to use,
and so intuitive!

Thanx a lot!
Daniel BI


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-28 21:35 UTC]
You have just discovered daylight savings time..
I get 2 on my linux box..
So check your timezone. Definately not bug in PHP.

And date() expects a full timestamp anyway. 
This is not the way to count days between dates.


PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jul 07 01:04:05 2022 UTC