Home > Archive > PHP Programming > November 2007 > PHP and daylight saving time
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
PHP and daylight saving time
|
|
| mkneze@gmail.com 2007-11-23, 4:02 am |
| 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!
| |
| Erwin Moller 2007-11-23, 8:00 am |
| 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/functi...imezone-set.php
PHP5 and higher only.
Read the usercontributed notes for hints/links to solution in PHP4
Hope that helps.
Regards,
Erwin Moller
| |
| Erwin Moller 2007-11-23, 8:00 am |
| Erwin Moller wrote:
> mkneze@gmail.com wrote:
>
> 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/functi...imezone-set.php
>
> PHP5 and higher only.
> Read the usercontributed notes for hints/links to solution in PHP4
>
> Hope that helps.
>
> Regards,
> Erwin Moller
| |
| C. (http://symcbean.blogspot.com/) 2007-11-23, 8:00 am |
| On 23 Nov, 12:17, Erwin Moller
< Since_humans_read_this_I_am_spammed_too_
m...@spamyourself.com> 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.
| |
| Toby A Inkster 2007-11-23, 8:00 am |
| 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
[G 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/
| |
|
| 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?
| |
| Rik Wasmus 2007-11-23, 7:01 pm |
| On Fri, 23 Nov 2007 14:09:32 +0100, C. (http://symcbean.blogspot.com/)
<colin.mckinnon@gmail.com> wrote:
> On 23 Nov, 12:17, Erwin Moller
> < Since_humans_read_this_I_am_spammed_too_
m...@spamyourself.com> wrote:
>
> 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
| |
| Toby A Inkster 2007-11-23, 7:01 pm |
| 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
[G 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/
|
|
|
|
|