From memory (unless it's been patched) versions of PHP below 5.2.4  
won't have the correct daylight savings dates.

Keri Henare (via iPhone)
+64 21 874 552

On 3/10/2009, at 9:23 PM, Simon J Welsh <[email protected]> wrote:

>
> The version of PHP running on that server doesn't have an up to date
> time zone database (remember, New Zealand's DST start/end times were
> changed recently). You can either upgrade your PHP version or install
> the PECL timezonedb extension.
> On 3/10/2009, at 8:54 PM, Stefan Schulz wrote:
>
>>
>> Hi there,
>>
>> I've run into a strange behaviour with daylight saving on an Ubuntu
>> feisty server:
>> consider the following program date.php:
>>
>> <?php
>> date_default_timezone_set  ( 'Pacific/Auckland'  );
>> echo date('r');
>> ?>
>>
>> Here is the command line output (feisty):
>> s...@weather:~$ date
>> Sat Oct  3 20:42:34 NZDT 2009
>> s...@weather:~$ php -f date.php
>> Sat, 03 Oct 2009 19:42:46 +1200
>>
>> The same program on my Ubuntu Jaunty:
>> s...@pluto:~$ date
>> Sat Oct  3 20:45:25 NZDT 2009
>> s...@pluto:~$ php -f date.php
>> Sat, 03 Oct 2009 20:45:32 +1300
>>
>> I copied the Pacific/Auckland timezone data file from Jaunty to the
>> Feisty system, but no change. Both systems do not have a default
>> timezone set in php.ini and the behaviour does not change whether I
>> call
>> date_default_timezone() in the script or not.
>>
>> I'm puzzled. Any pointer much apprechiated.
>>
>> Cheers
>> Stefan
>>
>>>
>
> ---
> Simon Welsh
> Admin of http://simon.geek.nz/
>
> Who said Microsoft never created a bug-free program? The blue screen
> never, ever crashes!
>
> http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e
>
>
>
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to