Re: How to disable the "Daylight saving time" in PHP 5?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/6/07, SED <sed@xxxxxx> wrote:
I need to disable the "Daylight saving time" in PHP 5.

My servers (Windows, both XP and Vista) have correct local time but PHP 5
adds an extra hour when I use date("H") or other time functions. Instead of
getting 9 AM, I get 10 AM.

If I run date("I"), I get 1, which confirms that PHP 5 is using "Daylight
saving time". If I change the system date to January I get correct hour.

I have tried google.com and I ran through the php.net manual but I didn't
find a solution. I cannot add time-fix on every php-page, they are to many.

Regards,
Summi

Netfang sed@xxxxxx
Heimasíða http://www.sed.is


I don't know a way to disable DST, but you can change your timezone in
the php.ini, so that you set it an hour back again :)
manual about date.timezone:
http://www.php.net/manual/en/ref.datetime.php#ini.date.timezone

Tijnema



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux