Re: Re: cvs: php-src / NEWS /ext/date php_date.c php_date.h/ext/date/tests bug26198.phpt
bug29585.phpt default-timezone-2.phpttimezone-configuration.phpt
| From: | Pierre-Alain Joye | Date: | Mon, 04 Jul 2005 01:03:51 +0000 |
| Subject: | Re: Re: cvs: php-src / NEWS /ext/date php_date.c php_date.h/ext/date/tests bug26198.phpt bug29585.phpt default-timezone-2.phpttimezone-configuration.phpt |
||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17092@lists.php.net to get a copy of this message | ||
On Sun, 3 Jul 2005 13:38:38 +0100
nlopess@php.net ("Nuno Lopes") wrote:
> So, you can give precedence to the ini option over the TZ var.
> That way you don't need the functions.
> IMHO this is the better choice, as it allows you to set a site
> wide ini option, without touching in the environment vars or
> having to call a function in each script.
If there was not a BC problem then we should simply forget the ENV
TZ variable. It's not reliable, not cross-platform and maybe even
not TS (not sure about all SAPI).
About TZ setting precedence, I see 2 needs:
1) Global or per host setting (ie vhost)
2) User defined per app
1) has precendence over TZ env and 2) over 1).
I do not remember if ini_set is disabled in safe_mode or if only
some settings are disabled. If ini_set itself is disabled, we
need this function.
About the names, I would like to go with date_default_timezone_set
and _get. Upcoming (not 5.1) features will have TZ per date
resource.
--Pierre