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

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

Comments

Projects
None yet
3 participants
@m-ivanov
Copy link

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

This comment has been minimized.

Copy link
Contributor

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

@gopherbot

This comment has been minimized.

Copy link

commented Jan 6, 2016

CL https://golang.org/cl/18314 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.
You can’t perform that action at this time.