Jump to content

date ()


jandrews3

Recommended Posts

I'm sorry. I'm really pretty new at this...

 

The following code: date®; is returning  Mon, 29 Oct 2007 15:54:06 -0600

 

That is MOST DEFINITELY not the case. It's an hour behind, but The GMT -0600 is correct so the only thing I can think of is that the server is gathering its time info from a source no longer in daylight saving. I checked date(O) and got a zero (indicating no longer in daylight saving). Is there a way to force this issue? I know its only another 6 days, but I have students who post questions much like this forum, and I want the times to be accurate.

Link to comment
https://forums.phpfreaks.com/topic/75272-date/#findComment-380711
Share on other sites

I'm in the central United States. My timezone is Central Standard Time. I'm afraid I don't know how to change my timezone. But even so, date (T) identifies my timezone correctly as CST. It's just an hour behind. Right now, it is 18:24:43, but date ® shows Mon, 29 Oct 2007 17:24:43 -0600. Again, the -0600 is right, but the server seems to be giving the time without daylight saving. The US passed a law this year changing our daylight saving date to next week as opposed to this week. I guess it is likely that the server/company I'm using has not taken this into account. Date(I) returns 0 meaning daylight saving is not active. That is wrong. Our daylight saving ends next sunday. Oh well.

Link to comment
https://forums.phpfreaks.com/topic/75272-date/#findComment-380772
Share on other sites

So actually what you're saying is that date(T) incorrectly identifies your timezone as CST, rather than correctly as CDT.

Same story for the -0600 offset.  CDT offset is -0500.

 

You could put in a workaround - http://us3.php.net/manual/en/function.date-timezone-set.php

Or just call tech support for the server and notify them of the problem.

Link to comment
https://forums.phpfreaks.com/topic/75272-date/#findComment-380800
Share on other sites

So actually what you're saying is that date(T) incorrectly identifies your timezone as CST, rather than correctly as CDT.

Same story for the -0600 offset.  CDT offset is -0500.

 

You could put in a workaround - http://us3.php.net/manual/en/function.date-timezone-set.php

Or just call tech support for the server and notify them of the problem.

 

its never "wrong" Period, just not what you desire.

Link to comment
https://forums.phpfreaks.com/topic/75272-date/#findComment-380813
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.