Bug #81097 [Asn->Csd]: DateTimeZone silently falls back to UTC when providing an offset with seconds

From: Date: Sun, 08 Aug 2021 12:43:20 +0000
Subject: Bug #81097 [Asn->Csd]: DateTimeZone silently falls back to UTC when providing an offset with seconds
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235683@lists.php.net to get a copy of this message
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)

« previous php.bugs (#235683) next »