Lester Caine wrote:
Chris wrote:
In more than one place in the PHP documentation it refers to the
order in which the new Date/Time functionality determines the
appropriate time zone.
That order is:
1) the value set by date_default_timezone_set(), if any
2) the TZ environmental variable
3) the date.timezone php.ini option
4) "magical guess"
5) UTC
Is this indeed the actual order?
Would it not make more sense to prioritize the date.timezone php.ini
setting over the TZ environmental variable?
assuming that date.timezone can be set at the .htaccess level,
which hopefully it can be, I thoroughly agree with you.
especially given that the new date extension was originally plugged
with the helpful feature of not being bound to the system settings... IIRC.
That way users who don't have control over their TZ environmental
variable (such as might be the case with some shared hosting
environments) could set the timezone in an htaccess file rather than
having to ensure they call date_timezone_default_set() in every script.
Of cause this still does nothing for the vast majority of hosting, where
it's the timezone/daylight saving of the client that you need, not the
server :(
maybe I'm missing your point completely but the whole point of
date_default_timezone_set() is that you can set the TZ specifically for
each request.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php