Skip to content

time: RFC1123 format should not say "UTC" #13781

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

Closed
m-ivanov opened this issue Dec 30, 2015 · 2 comments
Closed

time: RFC1123 format should not say "UTC" #13781

m-ivanov opened this issue Dec 30, 2015 · 2 comments
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Milestone

Comments

@m-ivanov
Copy link

after reading a couple of times the RFC1123 i think that strings returned by time.Format(time.RFC1123) is not correct

fmt.Printf("\n\nthis is not RFC1123  %s \n\n", time.Now().UTC().Format(time.RFC1123));
// Wed, 30 Dec 2015 15:10:40 UTC 

searching around i found a post that reflect mo opinions about
http://stackoverflow.com/questions/25658897/is-utc-a-valid-timezone-name-for-rfc-1123-specification

i know that the format already exist and is "http.TimeFormat" but what i want to point out is that the term "time.RFC1123" is wrong/inexact and just bring more confusion

@ianlancetaylor ianlancetaylor changed the title Incorrect time.RFC1123 format , return UTC instead GMT time: RFC1123 format should not say "UTC" Dec 31, 2015
@ianlancetaylor
Copy link
Member

Looking at RFC 1123 and RFC 822, it does seem that a date in that format should say "GMT" or "UT" but not "UTC". I think it would probably be a mistake to change the behavior of time.RFC1123 at this point, but we could at least document the discrepancy. Note that the RFCs recommend the use of what Go calls time.RFC1123Z.

@ianlancetaylor ianlancetaylor added the Documentation Issues describing a change to documentation. label Dec 31, 2015
@ianlancetaylor ianlancetaylor added this to the Go1.6Maybe milestone Dec 31, 2015
@gopherbot
Copy link
Contributor

CL https://golang.org/cl/18314 mentions this issue.

@rsc rsc closed this as completed in 39c3e0f Jan 6, 2016
@golang golang locked and limited conversation to collaborators Jan 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants