How to get TimeZone by RemoteIP or for specific city

Programming

The goal: to find out the TimeZone of a visitor. There are few free services that can give you this information. First step is to get the City name by RemoteIP address – there are free services/databases that helps you to achieve this, one of them is MaxMind. When you have a city name you can get its latitude/longitude from the database of the same service or you can use Google API like this: For Berlin, Germany: https://maps.googleapis.com/maps/api/geocode/json?address=Berlin&sensor=false You will get JSON result like this: After getting latitude and longitude…read more