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?
相关问题
- Display time in local timezone when querying Influ
- lon,lat to timezone
- VBA local timezone adjustment
- SimpleDateFormat fails to format Date interval?
- How to transform IP addresses into geolocation in
相关文章
- TimeZoneInfo vs. Olson database
- Using AT TIME ZONE to get current time in specifie
- Storing Doctrine2 DateTime in UTC Only
- Fullcalendar and timezones. Help, I'm doing it
- Insert a tzinfo into datetime
- Django - 'datetime.date' object has no att
- How to compute the time difference between two tim
- PostgreSQL update time zone offset
Visit http://www.iana.org/time-zones/repository/tz-link.html
Download a Data file.
Check out the files iso3166.tab and zone.tab - between them they have everything you need.
If a commercial solution is acceptable, you could check out the World Time Zone Database.
Using Noda Time and the .NET Framework Culture and TimeZoneInfo classes We managed to create a Json File with the Following entries which worked for us.
Each Entry contains the list of available timezone for each country.
JsonFile here
Have you tried zoneinfo? http://www.twinsun.com/tz/tz-link.htm
"The public-domain time zone database contains code and data that represent the history of local time for many representative locations around the globe. It is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight-saving rules. This database (often called tz or zoneinfo) is used by several implementations, including the GNU C Library used in GNU/Linux, FreeBSD, NetBSD, OpenBSD, Cygwin, DJGPP, AIX, Mac OS X, OpenVMS, Oracle Database, Solaris, Tru64, and UnixWare."
Hope that helps :)
Ruby on Rails uses the following mapping for timezones: http://apidock.com/rails/TimeZone
timezonedb: https://timezonedb.com/
could also be mentioned. You can go to download page and find what format is most suitable for your project.