golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.91k stars 17.65k forks source link

proposal: time/zones: new package for time zones list #70203

Open srikantgudi opened 5 hours ago

srikantgudi commented 5 hours ago

It would be good to add a package time/zones or a function time.LoadLocations() to load all zones in IANA database.

This could be used as

zones := time.LoadLocations()
gabyhelp commented 5 hours ago

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

ianlancetaylor commented 4 hours ago

This seems a bit special purpose. Why should it be in the standard library? Are there other languages that provide this functionality in their standard library?