Country to Timezone mapping database

2020-01-29 09:24发布

I'm looking at building a form which prompts a user for their timezone. I've looked at the 'Google approach' and it seems to work pretty well. You first select a country from a drop down list and based on the selection, it populates the drop down list with the time zone options. I've search all over for a decent database with a country - timezone relationship but can't seem to find one. Does anyone know where i can find one?

标签: timezone
7条回答
迷人小祖宗
2楼-- · 2020-01-29 10:21

The official mappings are found in the zone.tab file of the IANA time zone database.

There is also a newer version of this file, which covers cases where a time zone may be in use by more than one country. It is also in the IANA time zone database, and is called zone1970.tab.

查看更多
登录 后发表回答