Re: [PHP4] getdate() and the Time zone?
| From: | Thomas Deliduka | Date: | Tue, 17 Oct 2000 15:01:12 +0000 |
| Subject: | Re: [PHP4] getdate() and the Time zone? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20642@lists.php.net to get a copy of this message | ||
Not sure but I think gmdate() would be better if you want to make sure you
get the GMT time.
http://www.php.net/manual/function.gmdate.php
On 10/17/00 3:44 AM this was written:
> 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?
--
Thomas Deliduka
IT Manager
-------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/