Timezone database
Timezone database in SQL format associated with world countries and region with all timestamps of daylight saving time (DST).
The data for each zone is from the tz database and the association of countries regions was made manually with Statoids.
Download
Tables content
- fips_regions : World regions by country using the FIPS standard
- iso3166_countries : World countries using the ISO3166 standard
- timezones : Timezones name
- timezones_data : The data for all timezones, gmtoff in seconds
Usage
Simple example to get current timezone for Quebec, Canada
SELECT tzd.gmtoff, tzd.isdst, tz.name FROM `timezones_data` tzd JOIN `timezones` tz ON tz.id = tzd.timezone WHERE tzd.timezone = ( SELECT `timezone` FROM `fips_regions` WHERE `country_code` = 'CA' AND `code` = '10' ) AND tzd.start < UNIX_TIMESTAMP( now( ) ) ORDER BY tzd.start DESC LIMIT 1
More
For help, support and to report errors please visit IPInfoDB. There is also an API available.
- subjects:

