![]() |
sponsored links |
|
|
sponsored links
|
|
1
18th September 08:38
External User
Posts: 1
|
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@sed.is Heimasíđa http://www.sed.is |
|
|
|
4
18th September 08:38
External User
Posts: 1
|
I changed my timezone in php.ini to:
date.timezone = GMT0 ; ....and it works! Thanks! Regards, Summi Netfang sed@sed.is Heimasíđa http://www.sed.is -----Original Message----- From: Tijnema ! [mailto:tijnema@gmail.com] Sent: 6. apríl 2007 09:43 To: SED Cc: php-general@lists.php.net Subject: Re: [php] How to disable the "Daylight saving time" in PHP 5? 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 |
|
|
5
18th September 08:38
External User
Posts: 1
|
The Windows clocks are correct. The PHP 5 added always one hour. However,
Tijnema pointed me to his solution: Change in php.ini date.timezone = GMT0 And therefore it will not add one hour to the system clock which is correct. Regards, Summi Netfang sed@sed.is Heimasíđa http://www.sed.is -----Original Message----- From: Jochem Maas [mailto:jochem@iamjochem.com] Sent: 6. apríl 2007 10:06 To: Tijnema ! Cc: SED; php-general@lists.php.net Subject: Re: [php] How to disable the "Daylight saving time" in PHP 5? these are not servers - they barely run something worthy of calling an OS. yeah - chances are the default timezone is not your timezone - setting the correct one may fix it. also what happens if you turn of the windows 'auto update DST' setting? |
|