On Mon, 12 Dec 2011, Evert Pot wrote:

> On Dec 11, 2011, at 1:07 PM, Pierre Joye wrote:
> 
> > On Sun, Dec 11, 2011 at 1:59 AM, Oleg Oshmyan <chor...@inbox.lv> wrote:
> > 
> >> I am willing to work on patches but I suppose some consensus should be
> >> reached first.
> > 
> > The consensus was that you have to set a valid default timezone in 
> > php.ini
> 
> I feel there may be a lot of value for people being able to install 
> PHP applications and run them without any additional configuration.
> 
> What would be the recommended way to have PHP reflect the systems 
> timezone?

The best way is always going to be: set it up yourself.

> I like the PHP 5.4.0 behaviour of defaulting to UTC if it's not setup, 
> but would it be possible to get the old functionality through a 
> warning-less 'date_guess_system_timezone'.
> 
> The 'guess' in the function-name should be enough of a warning. People 
> who opt-in to this behaviour explicitly comply to the possible 
> inaccuracy of the result. I would be one of those people, and as much 
> as it may disturb you; I feel I'm not alone.

The extension already has 
http://uk3.php.net/manual/en/function.timezone-name-from-abbr.php
which is basically the guessing algorithm.

cheers,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to