Is it Daylight Savings Time ?
Is it Daylight Savings Time ?
am 25.10.2007 14:37:06 von NerdRevenge
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
Re: Is it Daylight Savings Time ?
am 26.10.2007 02:43:12 von Jeremy
bill wrote:
> 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
Re: Is it Daylight Savings Time ?
am 26.10.2007 10:30:47 von AnrDaemon
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.
Don't forget to set date.timezone to client timezone before checking that.
--
Sincerely Yours, AnrDaemon
Re: Is it Daylight Savings Time ?
am 26.10.2007 15:26:02 von NerdRevenge
AnrDaemon wrote:
> 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.
>
> Don't 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'll get around that.