PHP and daylight saving time
PHP and daylight saving time
am 23.11.2007 10:34:35 von mkneze
Hi guys,
Is it somehow possible to disable DST in date() function? I am
currently in UTC+1 timezone which has DST enabled but data i am
processing are throughout the year in UTC+1 without DST. So, how can i
disable automatic DST processing of date() function?
Thanks in advance!
Re: PHP and daylight saving time
am 23.11.2007 13:15:18 von Erwin Moller
mkneze@gmail.com wrote:
> Hi guys,
>
> Is it somehow possible to disable DST in date() function? I am
> currently in UTC+1 timezone which has DST enabled but data i am
> processing are throughout the year in UTC+1 without DST. So, how can i
> disable automatic DST processing of date() function?
>
> Thanks in advance!
Hi,
Not 100% sure, but isn't this function made for that?
date_default_timezone_set()
http://nl2.php.net/manual/en/function.date-default-timezone- set.php
PHP5 and higher only.
Read the usercontributed notes for hints/links to solution in PHP4
Hope that helps.
Regards,
Erwin Moller
Re: PHP and daylight saving time
am 23.11.2007 13:17:32 von Erwin Moller
Erwin Moller wrote:
> mkneze@gmail.com wrote:
>> Hi guys,
>>
>> Is it somehow possible to disable DST in date() function? I am
>> currently in UTC+1 timezone which has DST enabled but data i am
>> processing are throughout the year in UTC+1 without DST. So, how can i
>> disable automatic DST processing of date() function?
>>
>> Thanks in advance!
>
> Hi,
>
> Not 100% sure, but isn't this function made for that?
> date_default_timezone_set()
>
addition: feed it 'Europe/London' for offset 0.
I think. ;-)
Be sure to test before believing me. :P
Erwin
> http://nl2.php.net/manual/en/function.date-default-timezone- set.php
>
> PHP5 and higher only.
> Read the usercontributed notes for hints/links to solution in PHP4
>
> Hope that helps.
>
> Regards,
> Erwin Moller
Re: PHP and daylight saving time
am 23.11.2007 14:09:32 von colin.mckinnon
On 23 Nov, 12:17, Erwin Moller
wrote:
>
> addition: feed it 'Europe/London' for offset 0.
> I think. ;-)
>
> Be sure to test before believing me. :P
>
I'm not actually in London but we have daylight savings time in the UK
(only its called 'BST' for British Summer Time to differentiate from
the movable feasts celebrated in other countries ;).
Try using 'GMT' or 'Zulu' or 'UTC'
C.
Re: PHP and daylight saving time
am 23.11.2007 14:15:57 von Toby A Inkster
Erwin Moller wrote:
> addition: feed it 'Europe/London' for offset 0.
> I think. ;-)
London observes daylight saving.
'UTC' might be better.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 17:39.]
It'll be in the Last Place You Look
http://tobyinkster.co.uk/blog/2007/11/21/no2id/
Re: PHP and daylight saving time
am 23.11.2007 16:16:07 von Robin Goodall
mkneze@gmail.com wrote:
> Hi guys,
>
> Is it somehow possible to disable DST in date() function? I am
> currently in UTC+1 timezone which has DST enabled but data i am
> processing are throughout the year in UTC+1 without DST. So, how can i
> disable automatic DST processing of date() function?
>
> Thanks in advance!
What about using gmdate() and adding an hour?
Re: PHP and daylight saving time
am 23.11.2007 17:53:46 von luiheidsgoeroe
On Fri, 23 Nov 2007 14:09:32 +0100, C. (http://symcbean.blogspot.com/)
wrote:
> On 23 Nov, 12:17, Erwin Moller
> wrote:
>>
>> addition: feed it 'Europe/London' for offset 0.
>> I think. ;-)
>>
>> Be sure to test before believing me. :P
>>
>
> I'm not actually in London but we have daylight savings time in the UK
> (only its called 'BST' for British Summer Time to differentiate from
> the movable feasts celebrated in other countries ;).
Well, it's the UK after all. No matter how you adjust your time, seeing
'daylight' is more dependant on the rare absence of clouds :P
--
Rik Wasmus
Re: PHP and daylight saving time
am 23.11.2007 20:15:19 von Toby A Inkster
Rik Wasmus wrote:
> Well, it's the UK after all. No matter how you adjust your time, seeing
> 'daylight' is more dependant on the rare absence of clouds :P
It was nice and sunny for me today. Freezing cold, sure, but clear blue
skies.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 1 day, 12 min.]
It'll be in the Last Place You Look
http://tobyinkster.co.uk/blog/2007/11/21/no2id/