php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11805 missing 3600 seconds between 10/13/2001 and 10/15/2001
Submitted: 2001-06-29 13:49 UTC Modified: 2001-06-30 04:57 UTC
From: php at reguly dot net Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.5 OS: debian gnu/linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at reguly dot net
New email:
PHP Version: OS:

 

 [2001-06-29 13:49 UTC] php at reguly dot net
Hello,

I am trying to write the days between 10/13/2001 and 10/15/20001:

$i = mktime(0,0,0,10,13,2001);// --> 1002942000 
$j = mktime(0,0,0,10,15,2001);// --> 1003111200

while ( $i <= $j ) {
  echo date("m-d-Y",$i);
  $i +=86400; 
}

but it stops on 10/14/2001, because 

    1002942000 ( $i )
          + 86400
          + 86400  
----------------------------
=  1003114800 
  - 1003111200 ( $j ) 
------------------------------
=             3600  ( should be zero ! )

I 've made a work-around using date(m,d+1,Y),
but somebdoy please explain me where are the
3600 seconds that are missing ?

Thanks,
gabriel


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-29 14:52 UTC] sniper@php.net
Does this happen with PHP 4.0.6? (I can't reproduce this with it)

 [2001-06-30 04:57 UTC] hholzgra@php.net
daylight saving time !

look for the optional seventh parameter to mktime
on http://php.net/mktime
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC