-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go1.8.3
What operating system and processor architecture are you using (go env)?
darwin, amd64
What did you do?
https://play.golang.org/p/zLXHSpuqye
This program on play.golang.org prints:
input: "America/New_York", output: "America/New_York", err: <nil>
input: "America/new_york", output: "UTC", err: cannot find America/new_york in zip file /usr/local/go/lib/time/zoneinfo.zip
On macOS 10.12.4 with a case insensitive HFS+ filesystem it prints:
input: "America/New_York", output: "America/New_York", err: <nil>
input: "America/new_york", output: "America/new_york", err: <nil>
What did you expect to see?
I expected an error to be returned when I ran time.LoadLocation("America/new_york"). These values should be treated as case sensitive. Also potentially valid would be for a valid location to be returned:
loc, _ := time.LoadLocation("America/new_york")
loc.String() == "America/New_York"
What did you see instead?
No error was returned, and a Location was returned with an invalid name. This causes valid zone names on macOS to fail to load on another machine using an identical zoneinfo.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.