How do I determine the timezone (in javascript) if Country-Code, State and City is known ? For example: Country:US State CA is know
Asked
Active
Viewed 1,706 times
0
-
The dup link asks about PHP, but the question and answer are pretty much the same otherwise. – Matt Johnson-Pint Nov 01 '16 at 16:23
1 Answers
0
There are a few libraries that include this information within them, one of this is https://www.npmjs.com/package/countryjs. Using their .info() you get the information of that zone, including timezone.
However, as mentioned in duplicates, this is hard since some states span multiple timezones.
Check this other duplicate, there are good answers there: What is the best way of getting the timezone from the city, country that user selects?
As mentioned, jsTimezoneDetect is a good resource.
Hope that helps.

Community
- 1
- 1

Obed Parlapiano
- 3,226
- 3
- 21
- 39