Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89265 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90273 invoked from network); 17 Nov 2015 11:35:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2015 11:35:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=martin.keckeis1@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=martin.keckeis1@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: martin.keckeis1@gmail.com X-Host-Fingerprint: 209.85.217.173 mail-lb0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:34331] helo=mail-lb0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/74-57591-B111B465 for ; Tue, 17 Nov 2015 06:35:56 -0500 Received: by lbbcs9 with SMTP id cs9so3620011lbb.1 for ; Tue, 17 Nov 2015 03:35:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8hUxSN69/Zi0cb3XXMGppyr7Du6t4y060dkiR50OWHI=; b=vGbo/jUsaDXKfVstMkw1FB/THxJgS/x1ZtpXQaz75Tn9klW1ZZBIVCKNAjleozH2IW qAptAeqJeRMOMdYK/rVqoLAqIaxt3Y8hEdPQm9ipieG21L4/DgOC/YhrNAt6FUlp0SjP v+wVmnpXrepTJ23B2QWV21Gm5XkGHEJgBAItvuMcbiBXPIvQu5AWtmBs0mtT2FwdtO+O 9yY+6721sCzqRf47LwavqBCtirlQ1h6hn7PDMpcmoiWU/eORoCo6TASqFGMi4hSFXxRM 6LhMmTYhGTYRpY7LjGFQddUFWRajPIxKqscmE0M/+/JBtSUTaxqFHD1/dmhRuO8v3VWT WJOg== MIME-Version: 1.0 X-Received: by 10.112.17.70 with SMTP id m6mr17302202lbd.76.1447760152437; Tue, 17 Nov 2015 03:35:52 -0800 (PST) Received: by 10.25.21.27 with HTTP; Tue, 17 Nov 2015 03:35:52 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Nov 2015 12:35:52 +0100 Message-ID: To: Derick Rethans Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c3d3e29b2dd60524baeda2 Subject: Re: [PHP-DEV] DateTime / Timezone funny behaviour, between different version From: martin.keckeis1@gmail.com (Martin Keckeis) --001a11c3d3e29b2dd60524baeda2 Content-Type: text/plain; charset=UTF-8 Hello, 2015-11-17 12:23 GMT+01:00 Derick Rethans : > On Tue, 17 Nov 2015, Martin Keckeis wrote: > > > Hello together, > > > > i just noticed that the date + timezone switching changed a lot last > time? > > > > tl;dr https://3v4l.org/pSplY > > > > When taking a old datetime: > > $date = \DateTime::createFromFormat('d.m.Y H:i:s', '01.01.1900 00 > :00:00', > > new \DateTimeZone('Europe/Berlin')); > > > > and switching between the given timezone and UTC, the date is sometimes > > corrected with some minutes+seconds and sometimes not. > > Berlin had some interesting timezone rules: > > Europe/Berlin Fri Mar 31 23:06:31 1893 UT = Fri Mar 31 23:59:59 1893 LMT > isdst=0 gmtoff=3208 > Europe/Berlin Fri Mar 31 23:06:32 1893 UT = Sat Apr 1 00:06:32 1893 CET > isdst=0 gmtoff=3600 > Europe/Berlin Sun Apr 30 21:59:59 1916 UT = Sun Apr 30 22:59:59 1916 CET > isdst=0 gmtoff=3600 > Europe/Berlin Sun Apr 30 22:00:00 1916 UT = Mon May 1 00:00:00 1916 CEST > isdst=1 gmtoff=7200 > > But there was a bug in PHP where we'd ignore the first block, and hence > picked a UTC offset of gmtoff=3208 for 1900-01-01, which was wrong. > That's now fixed again. > > 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 > Hui... then i run into a really rare failure, thank you :-) --001a11c3d3e29b2dd60524baeda2--