Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTime.fromString() allows invalid ISO 8601 dates #29

Open
cedx opened this issue Oct 8, 2020 · 0 comments
Open

DateTime.fromString() allows invalid ISO 8601 dates #29

cedx opened this issue Oct 8, 2020 · 0 comments

Comments

@cedx
Copy link

cedx commented Oct 8, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant