Re: DateTimeZone silently falls back to UTC when providing seconds
| From: | Benjamin Morel | Date: | Sat, 11 Sep 2021 21:58:32 +0000 |
| Subject: | Re: DateTimeZone silently falls back to UTC when providing seconds | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-116030@lists.php.net to get a copy of this message | ||
>
> >Before doing so, shouldn't we discuss whether it makes sense to accept
> >a
> >time-zone offset with seconds, when the granularity seems to be 15
> >mins?
> >
> >https://en.wikipedia.org/wiki/List_of_UTC_time_offsets
> >
> >— Benjamin
>
> No need. Early timezone offsets in the timezone database are in LMT (local
> mean time), which have second granularity.
>
> cheers,
> Derick
Hi, sorry for resurrecting an old thread, but now that this bug
<https://bugs.php.net/bug.php?id=81097>
has been fixed in PHP 8.0.10, I can
see that seconds have been forbidden from DateTimeZone altogether:
https://3v4l.org/QpSln
Before forbidding seconds in brick/date-time's *TimeZoneOffset* as well
(and going against JSR-310, which this library was derived from), can I
please know why this decision was made, when as I understand it, this goes
against your statement above?
Thanks in advance,
- Benjamin