Re: date.timezone E_WARNING -- Really necessary? What's the rationale?
| From: | Derick Rethans | Date: | Fri, 24 May 2013 18:23:25 +0000 |
| Subject: | Re: date.timezone E_WARNING -- Really necessary? What's the rationale? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67502@lists.php.net to get a copy of this message | ||
On Fri, 24 May 2013, Patrick Schaaf wrote:
> 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".
Absolutely not, as you can then never convert between that and another
zone. This nonsense is what Redhat patches into it as well and it is a
BAD idea. You'd have no idea which DST rules are
cheers,
Derick