DateTimeZone silently falls back to UTC when providing seconds

From: Date: Sun, 30 May 2021 21:45:12 +0000
Subject: DateTimeZone silently falls back to UTC when providing seconds
Groups: php.internals 
Request: Send a blank email to internals+get-114669@lists.php.net to get a copy of this message
Hi internals,

An issue <https://github.com/brick/date-time/issues/35>
was brought up on
my date-time library, that boils down to the fact that DateTimeZone
silently falls back to UTC when providing an offset with seconds:

(new DatetimeZone('+01:45:30'))->getName(); // 00:00

https://3v4l.org/9ZrK6

If this is unsupported (this would make sense), should it throw an
exception instead?

Thank you for your time.

⁠— Benjamin


Thread (9 messages)

« previous php.internals (#114669) next »