PHP4 & PHP5 timestamp difference

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

PHP4 & PHP5 timestamp difference

Post by pickle »

Hi all,

I've got 2 boxes here running PHP4 & PHP5.

The PHP4 box says 1:00 AM November 4th, 2007 MST is 1194163200
The PHP5 box says 1:00 AM November 4th, 2007 MST is 1194159600

Which one is correct & does anyone know why the difference? I'd tend to believe PHP4 is correct because it actually takes into consideration the missing hour.
Last edited by pickle on Mon Nov 05, 2007 12:27 pm, edited 1 time in total.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
seppo0010
Forum Commoner
Posts: 47
Joined: Wed Oct 24, 2007 4:13 pm
Location: Buenos Aires, Argentina

Post by seppo0010 »

I´m actually getting 1194159600 using PHP 4.4.4 and PHP 5.2.0
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I would suspect one has been updated with the newest set of Daylight times while the other has not.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Are there PHP patches one has to install? Both boxes output the same date & time when I call date from the command-line.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Are both boxes set to the correct timezone? I'm not sure it's PHP related.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Wouldn't the DST issue be moot at this point (DST is over)?

Check the BIOS time for both machines.

Or maybe you just didn't get your hoe ready?
link
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

DST ends at 2 AM on November 4 in the US regions.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

ooooohhhhhhh..... right. :oops:

You've probably compared dates outside DST already... so was that it?
Post Reply