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: second precision timezone format not documented #52516

Closed
alicebob opened this issue Apr 24, 2022 · 2 comments
Closed

time: second precision timezone format not documented #52516

alicebob opened this issue Apr 24, 2022 · 2 comments
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@alicebob
Copy link
Contributor

go doc time says:

    Numeric time zone offsets format as follows:

        "-0700"  ±hhmm
        "-07:00" ±hh:mm
        "-07"    ±hh

However, timezones with second precision ("-07:00:00" and "-070000") are also supported: https://github.com/golang/go/blob/master/src/time/format.go#L151

Could these be added to the documentation? Took me a while to figure out why my pre-1900 date with LMT timezone parsed correctly.

@ianlancetaylor ianlancetaylor added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Apr 25, 2022
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Apr 25, 2022
@ianlancetaylor
Copy link
Contributor

Thanks for the report. Want to send a patch?

cuiweixie added a commit to cuiweixie/go that referenced this issue Apr 25, 2022
cuiweixie added a commit to cuiweixie/go that referenced this issue Apr 25, 2022
cuiweixie added a commit to cuiweixie/go that referenced this issue Apr 25, 2022
@gopherbot
Copy link

Change https://go.dev/cl/402058 mentions this issue: time: typo more time zone offsets format

cuiweixie added a commit to cuiweixie/go that referenced this issue Apr 26, 2022
cuiweixie added a commit to cuiweixie/go that referenced this issue Apr 26, 2022
cuiweixie added a commit to cuiweixie/go that referenced this issue Apr 26, 2022
@golang golang locked and limited conversation to collaborators Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants