Bug #81097 [Asn->Csd]: DateTimeZone silently falls back to UTC when providing an offset with seconds
Edit report at https://bugs.php.net/bug.php?id=81097&edit=1
ID: 81097
Updated by: derick@php.net
Reported by: benjamin dot morel at gmail dot com
Summary: DateTimeZone silently falls back to UTC when
providing an offset with seconds
-Status: Assigned
+Status: Closed
Type: Bug
Package: Date/time related
Operating System: N/A
PHP Version: 8.0.6
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
If you are still experiencing this bug, try to check out latest source from https://github.com/php/php-src and re-test.
Thank you for the report, and for helping us make PHP better.
For 8.1.0beta3
Previous Comments:
------------------------------------------------------------------------
[2021-06-01 21:30:11] benjamin dot morel at gmail dot com
Description:
------------
As discussed in https://externals.io/message/114669
DateTimeZone silently falls back to UTC when providing an offset with seconds:
https://3v4l.org/9ZrK6
It should either work as expected with such an input, or if this is unsupported (which could make
sense), it should throw an exception.
Test script:
---------------
echo (new DatetimeZone('+01:45:30'))->getName();
Expected result:
----------------
+01:45:30
Actual result:
--------------
+00:00
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81097&edit=1
Thread (2 messages)