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 second field #54569

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

time: Parse of RFC3339 is incorrect for second field #54569

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-second field must be two digits wide,
followed by an optional period and one or more digits.

However, Parse permits that field having zero digits and a period and extra digits:

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

reports nil rather than an error.

@gopherbot
Copy link

Change https://go.dev/cl/425036 mentions this issue: time: fix Parse for empty seconds

@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