How can I determine the timezone of a website visitor?
It is possible to get the actual timezone of the website visitor’s computer by using JavaScript. A Google search reveals some useful code samples of how to determine the timezone using Javascript. Alternatively, you can use the output of the GeoIP database to estimate the timezone of the user. We provide a text file as well as PHP code for mapping countries, US states, and Canadian provinces to timezones in zoneinfo format (e.g. America/New_York). Our C, Java, PHP, Python and Perl APIs have built-in support for timezone lookups as well.
It is possible to get the actual timezone of the website visitor’s computer by using JavaScript. A Google search reveals some useful code samples of how to determine the timezone using JavaScript. Alternatively, you can use the output of the GeoIP database to estimate the timezone of the user. We provide a text file as well as PHP code for mapping countries, US states, and Canadian provinces to timezones in zoneinfo format (e.g., America/New_York). Our C, Java, PHP, Python and Perl APIs have built-in support for timezone lookups as well.