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

time: Parse of RFC3339 is incorrect for timezone field #54570

Closed
dsnet opened this issue Aug 21, 2022 · 1 comment
Closed

time: Parse of RFC3339 is incorrect for timezone field #54570

dsnet opened this issue Aug 21, 2022 · 1 comment

Comments

@dsnet
Copy link
Member

dsnet commented Aug 21, 2022

RFC 3339, section 5.6 specifies that the time-numoffset field must be either a minus or plus sign followed by 2 digits a colon and 2 digits.

However, Parse permits the integer fields having plus and minus signs:

Parse(time.RFC3339, "0000-01-01T00:00:00+-0:+0")

reports nil rather than an error.

@gopherbot
Copy link

Change https://go.dev/cl/425038 mentions this issue: time: fix Parse for time zones

@golang golang locked and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants