Re: Time Zone Offset?
| From: | DL Neil | Date: | Sun, 13 Jan 2002 14:31:56 +0000 |
| Subject: | Re: Time Zone Offset? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80352@lists.php.net to get a copy of this message | ||
Marvin,
> I'm using the PHP date() function on my site, but since my hosting company
> (Pair Networks) is on the East Coast and I'm on the West Coast, everything
> shows as three hours later (for most of my visitors, anyway). Pair tells me
> there's no setting I can make on my account to change the server time zone.
=not competent to comment. Recommend a review of the php.ini file commands and even if you
can't gain access to
that file on the server, the function which allows you to make a change to the PHP environment for
the life of
the current script.
> Can anyone recommend a way to set an offset for the date() function in PHP?
> (I searched on php.net and couldn't find anything.)
=I run an international service, and would have had a massive headache if each client was to see
things stated
in their own timezone. We agreed that each would make specifications in their own timezone (and
language...) but
that all system output would be in GMT.
=To your question: read up on the time/date functions for GMT, convert all input and store all
date/times as
GMT; and at retrieval time convert time/dates from GMT to whichever time zone you want to use. PS
also takes
care of bi-annual summer time discontinuities too (should they apply to you).
=Regards,
=dn