Re: 5.4 DateTimeZone: Supported timezones have changed

From: Date: Mon, 09 Sep 2013 20:51:34 +0000
Subject: Re: 5.4 DateTimeZone: Supported timezones have changed
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Mon, 9 Sep 2013, Derick Rethans wrote:

> On Mon, 9 Sep 2013, Martin Keckeis wrote:
> 
> > If you use a deprecated Timezone somewhere and don't know it, it's hard to
> > track down...(no exception)
> > I only found it "randomly" today, that i've used it there and all time data
> > in the database are not correct...
> > 
> > If you use something like:
> > \DateTime::createFromFormat('Y-m-d H:i:s', '2013-09-09 14:49:00', new
> > DateTimeZone('CET'))
> > 
> > Just the default timezone from ini will be used and therefor the dateTime
> > value is wrong if you save it or display it somewhere...
> 
> That is not true. CET is actually mapped to Europe/Berlin. This mapping 
> was made specifically for BC reasons.

Or even in a smaller example:

derick@whisky:~ $ php -r '$a = new DateTimeZone("CET"); echo $a->getName(),
"\n";'
Europe/Berlin

cheers,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
Posted with an email client that doesn't mangle email: alpine


Thread (9 messages)

« previous php.internals (#68983) next »