ID:               19914
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Windows 98
 PHP Version:      4.2.3
 New Comment:

We are happy to tell you that you just discovered Daylight Savings
Time. For more information see:
http://webexhibits.org/daylightsaving/b.html


Previous Comments:
------------------------------------------------------------------------

[2002-10-15 03:26:29] [EMAIL PROTECTED]

To whom it may concern,

I noticed you have another October date bug pending, but it was in
spanish, and I don't understand it.

I believe this is a bug:  October 27, 2002 spans 90000 seconds, rather
than 86400.  Please let me know if I am incorrect.

I have isolated the bug on a page on my server:

http://68.50.50.189/wp_test_stuff/bug.php

"01:00 am 27 Oct 2002" appears twice in the list.

Here is the code used to produce this page:

<?php

//  timestamps are 90000 seconds apart
$debug_seven = mktime(0,0,0,10,27,2002);
echo "10-27-2002 timestamp: $debug_seven<br>";
$debug_eight = mktime(0,0,0,10,28,2002);
echo "10-28-2002 timestamp: $debug_eight<p>";

//begin on october 27, 2002, and increment every hour
for ($ts=1035702000; $ts <= 1035792000; $ts+=3600){
  echo "<br>" . date("h:i a d M Y", $ts);
}

echo "<P><HR><P>";

phpinfo();
echo "<hr>$HTTP_USER_AGENT\n";

?>

If this is a bug, I hope you are able to spend less time fixing it than
I spent isolating it.

I received the error using a loop to cycle through consecutive days by
incrementing my timestamp += 86400.

I have changed my code by using this time-expensive kludge, but it
works:

//  increment to the next day
$my_timestamp = mktime(0,0,0,
date("m",$my_timestamp),
date("d",$my_timestamp)+1,
date("Y",$my_timestamp));

I hope I have been clear.  Thank you for your time in considering this.
 Please remove the NOSPAM from my e-mail address when replying

-Jon

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19914&edit=1

Reply via email to