Folks, I made a small calendar system, where I run through a month in
a loop, adding 86400 to the current timestamp. As a day has 86400
seconds, this works fine.
Or so I thought.
In a specific day in february (it happens every year, always around
day 18), when I add 86400 seconds to the timestamp, it adds only 23
hours.
This is the output of a test program. It calls print_r() on the output
of getdate(), passing both timestamps. The difference between the
timestamps is only 23 hours, and not 24 as it should.
First:
Array
(
[seconds] => 0
[minutes] => 0
[hours] => 0
[mday] => 19
[wday] => 6
[mon] => 2
[year] => 2005
[yday] => 49
[weekday] => Saturday
[month] => February
[0] => 1108778400
)
Second:
Array
(
[seconds] => 0
[minutes] => 0
[hours] => 23
[mday] => 19
[wday] => 6
[mon] => 2
[year] => 2005
[yday] => 49
[weekday] => Saturday
[month] => February
[0] => 1108864800
)
Note that 1108864800-1108778400=86400, but the difference in hours is
just 23 hours. I'm kinda confused. Can someone explain this?
--
Bruno Lustosa, aka Lofofora | Email: [EMAIL PROTECTED]
Network Administrator/Web Programmer | ICQ: 1406477
Rio de Janeiro - Brazil |
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/