Re: DateTimeZone silently falls back to UTC when providing seconds
| From: | Derick Rethans | Date: | Sun, 30 May 2021 22:10:21 +0000 |
| Subject: | Re: DateTimeZone silently falls back to UTC when providing seconds | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-114670@lists.php.net to get a copy of this message | ||
On 30 May 2021 22:45:12 BST, Benjamin Morel <benjamin.morel@gmail.com> wrote:
>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
I can't think of why this couldn't work. Duke a bug report please at bugs.php.net?