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

Parsing ZonedTime from non-offset ISO 8601 #257

Open
MangoIV opened this issue May 31, 2024 · 3 comments
Open

Parsing ZonedTime from non-offset ISO 8601 #257

MangoIV opened this issue May 31, 2024 · 3 comments

Comments

@MangoIV
Copy link

MangoIV commented May 31, 2024

Currently the iso8601 parser fails when trying to parse a ZonedTime from a non-offset time stamp. I was wondering why it doesn’t succeed and just “assumes” utc.

thanks in advance!

@AshleyYakeley
Copy link
Member

Do you have a code example?

@MangoIV
Copy link
Author

MangoIV commented May 31, 2024

-- >>> x @UTCTime
-- Just 2024-05-30 16:15:18 UTC
-- >>> x @ZonedTime
-- Nothing
x :: ISO8601 t => Maybe t 
x = iso8601ParseM "2024-05-30T16:15:18Z"

here I would assume that it would be fine to parse into utcToZonedTime utc

@Kleidukos
Copy link
Member

@AshleyYakeley This was notably discovered in the Security Advisories tooling, but I don't doubt other people have found it on their own.

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

3 participants