[PHP4] getdate() and the Time zone?
| From: | Chris Blaise | Date: | Tue, 17 Oct 2000 07:44:18 +0000 |
| Subject: | [PHP4] getdate() and the Time zone? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20641@lists.php.net to get a copy of this message | ||
I have a problem where if I change the time zone PHP doesn't recognize it
in getdate(). For example, if the time is 12:05 in Europe/London and I
change the time zone to US/Mountain, the hour index in the array from
getddate() returns a 19 instead of a 12.
I've tried setting the TZ environment variable before the getdate() call
and it doesn't make a difference.
I can fix the problem if I do a "cold" restart of Apache (sending a HUP or
USR1 signal won't cut it), but I'd rather not since it can cause the PHP
session to break, giving the user an empty page.
Any ideas to solve this problem besides a system() call to get the actual
time?
Thanks,
Chris