Package timezone provides utility for timezone.
Package latlong maps from a latitude and longitude to a timezone. It uses the data from http://efele.net/maps/tz/world/ compressed down to an internal form optimized for low memory overhead and fast lookups at the expense of perfect accuracy when close to borders. The data files are compiled in to this package and do not require explicit loading.
Package tz contains time zone info so that you can predictably load Locations regardless of the locations available on the locally running operating system. The stdlib time.LoadLocation function loads timezone data from the operating system or from zoneinfo.zip in a local Go installation. Both of these are often missing from some operating systems, especially Windows. This package has the zoneinfo.zip from Go embedded into the package so that queries to load a location always return the same data regardless of operating system. This package exists because of https://github.com/golang/go/issues/21881.
Package fuzzytime helps with the parsing and representation of dates and times. Fuzzytime defines types (Date, Time, DateTime) which have optional fields. So you can represent a date with a year and month, but no day. A quick parsing example: This should output: Timezones, once resolved, are stored as an offset from UTC (in seconds). Sometimes dates and times are ambiguous and can't be parsed without extra information (eg "dd/mm/yy" vs "mm/dd/yy"). The default behaviour when such a data is encountered is for Extract() function to just return an error. This can be overriden by using a Context struct, which provides functions to perform the decisions required in otherwise-ambiguous cases.
Package timezones provides an array of timezones as well as a simple API for accessing and searching timezones.
Package timezones provides an slice of timezones as well as a simple API for accessing and searching timezones.
Package timezone provides two ways to retrieve the timezone for any latitude,longitude position. https://developers.google.com/maps/documentation/timezone/ This API is free and limits you to 2,500 calls a day. You will receive a GoogleTimezone object if the call is successful. http://www.geonames.org/ This API is free with registration and has no limit. If you upgrade to a premium account you can be guaranteed fast and reliable response times. The TimezoneID is a location name corresponding to the IANA Time Zone database. Go provides this database in the /lib/time/zoneinfo.zip file. Because of this we can use the TimezoneID within the time package: