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.
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:
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:
Package timezones provides an array of timezones as well as a simple API for accessing and searching timezones.
Package localtimezone 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 purely in-memory. Uses ~50MB of ram