Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89261 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81953 invoked from network); 17 Nov 2015 10:42:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2015 10:42:04 -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.215.41 as permitted sender) X-PHP-List-Original-Sender: martin.keckeis1@gmail.com X-Host-Fingerprint: 209.85.215.41 mail-lf0-f41.google.com Received: from [209.85.215.41] ([209.85.215.41:34469] helo=mail-lf0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/E2-57591-A740B465 for ; Tue, 17 Nov 2015 05:42:04 -0500 Received: by lffu14 with SMTP id u14so2832536lff.1 for ; Tue, 17 Nov 2015 02:41:58 -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 :content-type; bh=fLFy6GgBlYO0bPC1J2B4mH6FUS+pcitC4IT0zJ5YC0U=; b=SXGjqXQ/VWBljlP1IJJm9kIQ4PD4mX61Ib1gA9qjS77ONyi9pfVLGNJZej65r0rMIa CwKMIgYpKIFK/67RZbKXdM4b/ZUaP7ydd89ig8nZ9XyCdbTzUIqzQGeAzw0MH8p1J7Rn QQ0vPU97DdN8n+aesoPrXzxl0oeGG+z+hHLR8cd6miAeNl04DQ9hboP4EJCFm3ah/etk r+e4ZfGs8wb44UvqTIzYXdX+JtrTKHz6FnM98Pg3lSH8gHeLWpVxvToz1R4hKDQCaEpW 58JzzFJiKwN8nw0iANQo81XCqXD5jlSM14rjoqondYXlLKY4gLfBjEhS3TgLL2XOYIz5 sf4A== MIME-Version: 1.0 X-Received: by 10.25.155.134 with SMTP id d128mr19525694lfe.14.1447756918726; Tue, 17 Nov 2015 02:41:58 -0800 (PST) Received: by 10.25.21.27 with HTTP; Tue, 17 Nov 2015 02:41:58 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Nov 2015 11:41:58 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=001a11401578dca73a0524ba2c8b Subject: Re: DateTime / Timezone funny behaviour, between different version From: martin.keckeis1@gmail.com (Martin Keckeis) --001a11401578dca73a0524ba2c8b Content-Type: text/plain; charset=UTF-8 Hello, 2015-11-17 11:40 GMT+01:00 Martin Keckeis : > 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. > > $date->setTimezone(new DateTimeZone('UTC')); > // 5.6.9 > // output is 1899-12-31 23:06:32.000000 > > // 5.6.7 > 1899-12-31 23:00:00.000000 > > > 5.6.15 seems to be fine again? > > Anybody else have such behaviours? > Here is the new example, with the switching back to original timezone https://3v4l.org/qdN9D --001a11401578dca73a0524ba2c8b--