Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68982 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5205 invoked from network); 9 Sep 2013 20:50:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2013 20:50:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:42586] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/7E-03199-D843E225 for ; Mon, 09 Sep 2013 16:50:21 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id BFFE1DEA04; Mon, 9 Sep 2013 21:50:18 +0100 (BST) Date: Mon, 9 Sep 2013 21:50:18 +0100 (BST) X-X-Sender: derick@whisky.home.derickrethans.nl To: Martin Keckeis cc: Lester Caine , PHP internals In-Reply-To: Message-ID: References: <522DB9A8.7040303@lsces.co.uk> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] 5.4 DateTimeZone: Supported timezones have changed From: derick@php.net (Derick Rethans) 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. derick@whisky:~ $ php class DateTime#1 (3) { public $date => string(19) "2013-09-09 14:49:00" public $timezone_type => int(3) public $timezone => string(13) "Europe/London" } derick@whisky:~ $ php class DateTime#2 (3) { public $date => string(19) "2013-09-09 14:49:00" public $timezone_type => int(3) public $timezone => string(13) "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