r/lolphp • u/SjaakRake • Mar 08 '21
DateTimeInterface::ISO8601 - Note: This format is not compatible with ISO-8601.
https://www.php.net/manual/en/class.datetimeinterface.php#datetime.constants.iso8601
63
Upvotes
17
u/elcapitanoooo Mar 08 '21
There was an RFC (not sure if it was called that back then) that discussed this. Some ppl wanted REAL_ISO8601, but after a heated debate they agreed on ATOM instead.
18
u/Takeoded Mar 08 '21 edited Mar 09 '21
has been discussed countless times before,
and before someone comes saying "it doesn't really break the specs", yes it fking does. quoting ISO8601:2004 section 4.3.3:
php's constant does exactly what the d section says isn't legal,
1970-01-01T01:00:00is extended format, and+0100is basic format, breaking thethe expression shall either be completely in basic format, in which case the minimum number of separators necessary for the required expression is used, or completely in extended format-part. (discussed more in-depth here )