Rasmus Lerdorf wrote:
This is fixed in PHP 5.4 by completely dropping support for the TZ
environment variable. PHP will always use UTC unless you explicitly set
it to something. It won't matter which timezone the system is running
in. This is the only reliable way to always have consistent behaviour
across all environments.
Just taking that a step further ...
The second that you need to actually take a users time zone into consideration,
then the best way of working is to RUN the sever set to UTC. And store any time
information in UTC. Then you can display times TO USERS either as UTC, or as
their own local time or the local time of the location an event is happening at.
You just need to remember that timezone information provided by the browser is
only todays time offset, so any area with daylight saving will be wrong for half
of the year, so that is the point you need to store a user or loction timezone
reference. Many systems still only store 'offset' which is simply wrong :)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php