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
time.LoadLocation() If an invalid value is passed on, it is displayed in fmt.Println() "UTC".
However, actually nil so panic occurs when you use the Location.
This behavior is https://github.com/golang/go/blob/master/src/time/zoneinfo.go#L73
Due to that it returns the UTC above.
I think this behavior had better fix.
Location I think is that we should be printed as if nil "".
Or, I think Location came back is good if it is available as UTC.
In that case, https://github.com/golang/go/blob/master/src/time/zoneinfo_unix.go#L89
I think I should I return the UTC above.
I think this sentence because English is not good I wrote in the google translation.
I'm sorry if there is an unknown sentence.
Thank you for reading to the last.
golang love! Fun!
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
behavior when an invalid value is passed to the time.LoadLocation()
time: don't print nil Location as "UTC"
Jun 4, 2015
Hi there
The first time I'll post.
http://play.golang.org/p/TAyGLFfUUa
time.LoadLocation() If an invalid value is passed on, it is displayed in fmt.Println() "UTC".
However, actually nil so panic occurs when you use the Location.
This behavior is
https://github.com/golang/go/blob/master/src/time/zoneinfo.go#L73
Due to that it returns the UTC above.
I think this behavior had better fix.
Location I think is that we should be printed as if nil "".
Or, I think Location came back is good if it is available as UTC.
In that case,
https://github.com/golang/go/blob/master/src/time/zoneinfo_unix.go#L89
I think I should I return the UTC above.
I think this sentence because English is not good I wrote in the google translation.
I'm sorry if there is an unknown sentence.
Thank you for reading to the last.
golang love! Fun!
The text was updated successfully, but these errors were encountered: