Bug #77600 [NEW]: DateTime ignores timezone of the php.ini

From: Date: Mon, 11 Feb 2019 07:19:35 +0000
Subject: Bug #77600 [NEW]: DateTime ignores timezone of the php.ini
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219487@lists.php.net to get a copy of this message
From: dominik dot zogg at gmail dot com Operating system: Ubuntu 14.04 PHP version: 7.3.2 Package: Date/time related Bug Type: Bug Bug description:DateTime ignores timezone of the php.ini 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 bug report at https://bugs.php.net/bug.php?id=77600&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77600&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77600&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77600&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77600&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77600&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77600&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77600&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77600&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77600&r=support Expected behavior: https://bugs.php.net/fix.php?id=77600&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77600&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77600&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77600&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77600&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77600&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77600&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77600&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77600&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77600&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77600&r=mysqlcfg

« previous php.bugs (#219487) next »