Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
proposal: time: add Location.Zone method? #20091
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
Keep also in mind that the set of timezones used in a Location can change over time, so I'm not so sure it would make sense to add a
The zone name and zone offset in use depend on exactly what time it is. That's why time.Time has the method and not time.Location. We could add a method on Location where you pass in a time, but then instead of loc.ZoneFor(t) why not do t.In(loc).Zone()?
(This is also why Location is called Location and not time.Zone.)