Time zone data for an IP address is provided by several MaxMind products:
- All of the GeoIP2 Precision web services except Country provide the time zone in the location object of the returned JSON.
- The GeoIP2 City database similarly provides the time zone in the location record. To find out how to access this, refer to the documentation for your language’s GeoIP2 API.
- The GeoIP Legacy Insights web service provides the time zone as the tenth field returned.
- Although the GeoIP Legacy databases do not directly support time zones, some of the APIs provide the ability to look up the approximate time zone from the region and country for the IP address. In particular, the Legacy C, Java, PHP, Python, and Perl APIs support this.
All time zones provided by MaxMind are in the IANA time zone format (e.g., America/New_York).
We are retiring our GeoIP Legacy downloadable database formats at the end of May 2022. Please see our blog post for more information, including how to migrate to GeoIP2. We will continue to support the GeoIP Legacy web services, although there will be data changes.