Bug #77600 [Fbk->Nab]: DateTime ignores timezone of the php.ini
| From: | cmb@php.net | Date: | Mon, 11 Feb 2019 12:42:24 +0000 |
| Subject: | Bug #77600 [Fbk->Nab]: DateTime ignores timezone of the php.ini | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219501@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77600&edit=1
ID: 77600
Updated by: cmb@php.net
Reported by: dominik dot zogg at gmail dot com
Summary: DateTime ignores timezone of the php.ini
-Status: Feedback
+Status: Not a bug
Type: Bug
Package: Date/time related
Operating System: Ubuntu 14.04
PHP Version: 7.3.2
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
So, not a bug on our side.
Previous Comments:
------------------------------------------------------------------------
[2019-02-11 08:40:38] dominik dot zogg at gmail dot com
requinix@php.net it works, seems that i had 7.3.2-1+ubuntu14.04.1+deb.sury.org+1 or
7.3.2-2+ubuntu14.04.1+deb.sury.org+1 (installed on friday afternoon)
issue can be closed
------------------------------------------------------------------------
[2019-02-11 07:33:17] requinix@php.net
Make sure you're using the latest version, which is currently
7.3.2-3+ubuntu14.04.1+deb.sury.org+1.
------------------------------------------------------------------------
[2019-02-11 07:19:35] dominik dot zogg at gmail dot com
Description:
------------
Create a new DateTime instance with a date, for example 2018-12-01 it get created with GMT, even if
the php.ini uses Europe/Zurich
Default timezone => Europe/Zurich
date.timezone => Europe/Zurich => Europe/Zurich
Test script:
---------------
<?php
$dateTime = new DateTime('2018-12-01');
echo $dateTime->format(\DateTime::ISO8601);
// expected: 2018-12-01T00:00:00+0100 with php.ini (Europe/Zurich)
// what happens: 2018-12-01T00:00:00+0000
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77600&edit=1