Assuming PHP ≥5.1, there's the ini setting date.timezone, otherwise 
date_default_timezone_set(), with the timezone being Pacific/Auckland
On 29/09/2010, at 10:13 AM, Brendan Brink wrote:

> found out the site of the client was running PHP Version 4.4.9
> 
> am upgrading now to version 5...
> 
> is there a command to set the local timezone to NZ or would this be
> defaulted with the new PHP version 5?
> 
> On Wed, Sep 29, 2010 at 10:06 AM, Brendan Brink
> <[email protected]> wrote:
>> hi there,
>> 
>> the date is echoing correctly currently to the right time and day
>> 
>> the issue is when i use strtotime("last Sunday") it shows its a
>> Saturday? (25th September) instead of Sunday 26th September
>> 
>> this is so frustrating...
>> 
>> any advice?
>> 
>> 
>> On Wed, Sep 29, 2010 at 9:53 AM, Aaron Cooper <[email protected]> wrote:
>>> Just to clarify, I mention 2008 and 2009 as I think 2008 was when the
>>> government DST changes occurred.
>>> 
>>> Easy test is to echo a date() and see what it says. If it's an hour out, you
>>> need an update.
>>> 
>>> http://www.electrictoolbox.com/correct-php-timezone/
>>> 
>>> 
>>> ----- Original Message -----
>>> From: Aaron Cooper
>>> To: [email protected]
>>> Sent: Wednesday, September 29, 2010 9:49 AM
>>> Subject: Re: [phpug] Daylight Saving
>>> As Rimu says, check the PHP timezonedb. Although I would have thought you
>>> would lose an entire day out of it (except at 11pm).
>>> 
>>> And that said, one would think the same server should have had this problem
>>> in 2008 and 2009 if it is the sole culprit and the server was running sites
>>> using any date function.
>>> 
>>> ----- Original Message -----
>>> From: Rimu Atkinson
>>> To: [email protected]
>>> Sent: Wednesday, September 29, 2010 9:35 AM
>>> Subject: Re: [phpug] Daylight Saving
>>> There is an internal database that php has of when different places have
>>> daylight savings time, and yours is probably out of date. Look at the output
>>> of phpinfo() to see the date of the time zone database.
>>> 
>>> R
>>> 
>>> On 29/09/10 09:26, Brendan Brink wrote:
>>> 
>>> Hi there all,
>>> 
>>> Had an issue on the weekend with some code showing the date Saturday
>>> 25th instead of the Sunday 26th...and only thing I can put it down to
>>> is a possible daylight saving conundrum...
>>> 
>>> some of the code I had was this:
>>> define("WEEKENDING",strtotime("next Sunday"));
>>> 
>>> 
>>> wonder if anyone else had had a similar finding or perhaps can shed
>>> some light on how daylight saving works with PHP...
>>> 
>>> 
>>> --
>>> Phone (04) 381 4827 or 021 823 129
>>> Skype rimu123
>>> Web http://rimu.geek.nz/
>>> 
>>> --
>>> NZ PHP Users Group: http://groups.google.com/group/nzphpug
>>> To post, send email to [email protected]
>>> To unsubscribe, send email to
>>> [email protected]
>>> 
>>> --
>>> NZ PHP Users Group: http://groups.google.com/group/nzphpug
>>> To post, send email to [email protected]
>>> To unsubscribe, send email to
>>> [email protected]
>>> 
>>> --
>>> NZ PHP Users Group: http://groups.google.com/group/nzphpug
>>> To post, send email to [email protected]
>>> To unsubscribe, send email to
>>> [email protected]
>> 
>> --
>> Kind Regards,
>> 
>> Brendan Brink
>> 
>> SMS Marketing Consultant | Manager
>> Sell2Cell Ltd.
>> 
>> 021 0246 1646 | [email protected] | www.sell2cell.co.nz
>> 
>> 
>> 
>> 
>>   We provide customized, cost-effective SMS & Web Solutions
>>   Need a website? Need to integrate text-messaging into your business
>>   or website? Contact us today for a free no-obligation quote!
>> 
>>   VISIT OUR ASSOCIATED WEBSITES:   textvouchers.com | textguru.co.nz
>> 
>> WARNING This email contains information which is CONFIDENTIAL and may
>> be subject to LEGAL PRIVILEGE. If you are not the intended recipient,
>> you must not peruse, use, disseminate, distribute or copy the email or
>> attachments. If you have received this in error, please notify us
>> immediately by return email, facsimile, or telephone (call us
>> collect).
>> 
> 
> 
> 
> -- 
> Kind Regards,
> 
> Brendan Brink
> 
> SMS Marketing Consultant | Manager
> Sell2Cell Ltd.
> 
> 021 0246 1646 | [email protected] | www.sell2cell.co.nz
> 
> 
> 
> 
>   We provide customized, cost-effective SMS & Web Solutions
>   Need a website? Need to integrate text-messaging into your business
>   or website? Contact us today for a free no-obligation quote!
> 
>   VISIT OUR ASSOCIATED WEBSITES:   textvouchers.com | textguru.co.nz
> 
> WARNING This email contains information which is CONFIDENTIAL and may
> be subject to LEGAL PRIVILEGE. If you are not the intended recipient,
> you must not peruse, use, disseminate, distribute or copy the email or
> attachments. If you have received this in error, please notify us
> immediately by return email, facsimile, or telephone (call us
> collect).
> 
> -- 
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]

---
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