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 tz provides timezone lookup for a given location * The timezone shapefile is embedded in the build binary using go-bindata * Supports overlapping zones * You can load your own geojson shapefile if you want * Sub millisecond lookup even on old hardware * The shapefile is simplified using a lossy method so it may be innacurate along the borders * This is purerly in-memory. Uses ~50MB of ram
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.