Sagewire Logo

Is it Daylight Savings Time ?

3 Message(s) by 2 Author(s) originally posted in php programming


From: bill Date:   Thursday, October 25, 2007
I found out that I can only set an offset in my session timezone
in my ISP 's MySQL server, not a timezone. So I am left with the
task of setting the offset, which will vary, depending on whether
or not DST is in effect.

Is there a way of discovering, from a PHP script is we are in DST
or standard time ?

bill


From: Jeremy Date:   Thursday, October 25, 2007
wrote in message :
I found out that I can only set an offset in my session timezone in my
ISP's MySQL server, not a timezone. So I am left with the task of
setting the offset, which will vary, depending on whether or not DST is
in effect.
Is there a way of discovering, from a PHP script is we are in DST or
standard time ?
bill



if(date("I") == 1)
{
//daylight saving time
}
else
{
//not daylight saving time
}

Whether this is accurate (in light of the recent change in the
definition of DST) is up to your server.

Jeremy


From: bill Date:   Friday, October 26, 2007
wrote in message:
Greetings, Jeremy.
In reply to Your message dated Friday, October 26, 2007, 04:43:12,
J> if(date("I") == 1)
J> {
J> //daylight saving time
J> }
J> else
J> {
J> //not daylight saving time
J> }
J> Whether this is accurate (in light of the recent change in the
J> definition of DST) is up to your server.
Do not forget to set date.timezone to client timezone before checking that.


yeah, that is the problem, my ISP will only allow setting the
timezone offset, not the timezone.

I will get around that.



Next Message: know when user tries to access php file


Blogs related to Is it Daylight Savings Time ?

Check Vehicle Lights Before Daylight Savings Time Ends
The end of Daylight Savings Time happens in most parts of the United States on Nov. 4 and creates unfamiliar driving conditions that can be hazardous without proper vehicle lighting. The Car Care Council recommends vehicle lights be ...

Any way to turn off daylight savings time in PHP5?
php.general: Any way to turn off daylight savings time in PHP5?

Daylight Saving Time changes
I've "been the route" on the support site as far as the upcoming time changes are concerned. I was easily able to find / download the appropriate files for desktops, servers, etc. HOWEVER, they're all ".exe" files - I need ...

Good Morning!
Body's Clock Never Adjusts to Daylight Savings TimeYou can't fool Mother Nature, experts say. Space Shuttle Gets Clean Bill Of HealthPreliminary in-orbit scans found no obvious damage from the launch to the nose cap or the leading-edge ...

Daylight Saving Time Ends November 4
This year, Daylight Saving Time (DST) ends at 2:00 am on November 4 (one week later than last year). If you have an older systems for which a DST update is not available and you manually updated your computer's time last spring when DST ...

Informed (1221): Oracle Calendar Daylight Saving Time Issues
Effective 2 hours ago: Beginning in 2007, Daylight Saving Time (DST) is extended an additional week in the fall, from October 28 until November 4. In Oracle Calendar, from October 28 until November 4, the current time and the red time ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional