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: RFC1123 format should not say "UTC" #13781

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

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

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


Copy link

@m-ivanov m-ivanov commented Dec 30, 2015

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

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
Copy link

@ianlancetaylor ianlancetaylor commented Dec 31, 2015

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 this to the Go1.6Maybe milestone Dec 31, 2015
Copy link

@gopherbot gopherbot commented Jan 6, 2016

CL mentions this issue.

@rsc rsc closed this 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.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.