DateTime icon indicating copy to clipboard operation
DateTime copied to clipboard

`DateTime.fromString()` allows invalid ISO 8601 dates

Open cedx opened this issue 5 years ago • 0 comments

An ISO date like 2000-13-48T00:00:00Z or 2000-01-01T29:73:82Z is invalid: the DateTime.fromString() method should throw an exception in this case. Instead, it returns a date where the timestamp is adjusted according to the "overflow": 2001-01-17 00:00:00 for 2000-13-48T00:00:00Z, 2000-01-02 06:14:22 for 2000-01-01T29:73:82Z.

cedx avatar Oct 08 '20 13:10 cedx