New Date/Time Functionality and Setting Timezones
| From: | Chris | Date: | Sun, 16 Apr 2006 23:37:41 +0000 |
| Subject: | New Date/Time Functionality and Setting Timezones | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-234091@lists.php.net to get a copy of this message | ||
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?
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.
Chris
chris@dented-planet.net