You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. import "log"
2. log.Println("Bye.")
http://play.golang.org/p/5LKl63qun5
What is the expected output?
I would expect to see a timestamp printed in a culture neutral, unambigous, and standard
date format (preferably the standard ISO 8601 format YYYY-MM-DDTHH:mm:ss.sssZ, with
fractional seconds, or its local time counterpart).
What do you see instead?
Instead something like
2013/08/08 23:00:00 Bye.
is printed.
Which compiler are you using (5g, 6g, 8g, gccgo)?
n.n.
Which operating system are you using?
Windows 7
Which version are you using? (run 'go version')
go version go1.1 windows/amd64
Please provide any additional information below.
See https://en.wikipedia.org/wiki/Date_format_by_country.
The text was updated successfully, but these errors were encountered:
Your issue isn't with Go, but with the log package's date format.
Per the comment at the top of the log package docs:
// Bits or'ed together to control what's printed. There is no control over the
// order they appear (the order listed here) or the format they present (as
// described in the comments). A colon appears after these items:
// 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message
Considering that there aren't 23 months, it's obviously yyyy/mm/dd. So it's ISO 8601,
but with slashes instead of hyphens. Sorry, this is probably just "Unfortunate". We
can't change it now. But it's not a weird US or Europe time format with years at the
end. It sorts lexicographically.
by kyrieuon:
The text was updated successfully, but these errors were encountered: