Re: date.timezone E_WARNING -- Really necessary? What's the rationale?
| From: | Patrick Schaaf | Date: | Fri, 24 May 2013 18:10:48 +0000 |
| Subject: | Re: date.timezone E_WARNING -- Really necessary? What's the rationale? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67501@lists.php.net to get a copy of this message | ||
Am 24.05.2013 18:45 schrieb "Derick Rethans" <derick@php.net>:
>
> On Fri, 24 May 2013, Leszek Krupiński wrote:
>
> > I was wondering - why not get time zone info from operating system? It's
> > should be quite easy on both *nixes and Windows. That way default value
would
> > be "from operating system", with possibility to override it in .ini.
>
> You can't, as the OS doesn't give you the timezone identifier in a
> portable way.
Couldn´t the default, in the absense of an .ini setting, be to use
localtime(), i.e. whatever libc does, with the timezone _identifier_ being
some string like "OS", "System", or "Localtime" - and we could then
also
use that identifier in .ini or ini_set to precisely say "use the same
timezone as all the other libc using programs on this system".
best regards
Patrick