{"name":"geo_offline","intro":"Built on the tzdata tables that ship with Python plus a curated alias list for cities that are not zone names — Mumbai, Bengaluru, Manchester, Silicon Valley. No network, no API key, no rate limit. Use it to turn “Mumbai” into `Asia/Kolkata` before any timezone conversion, and to get great-circle distance and bearing between two points.","when_to_use":["Resolving a city or country to an IANA zone before calling `datetime convert_tz`.","Finding the zone nearest a pair of coordinates.","Great-circle distance and compass bearing between two places or coordinates.","Listing every zone a country spans — the thing that makes “what time is it in the US?” unanswerable.","Not for driving distance, geocoding or address lookup; this dataset has none of those."],"network":false,"related":"[`datetime`](/docs/tools/datetime) `convert_tz` consumes the zone names this returns · [`convert`](/docs/tools/convert) to restate a distance in other units.","docs_url":"/docs/tools/geo_offline","modes":[{"name":"tz_for_place","purpose":"The IANA zone for a city or country.","description":"Resolves a place name to an IANA timezone and returns that zone's current offset, abbreviation, DST state, countries, reference coordinates and local time. Exact zone names, curated city aliases and country names are all accepted. A place that spans several zones is refused with the candidates listed — pass `all: true` to get them all instead.","parameters":[{"name":"place","type":"string","required":true,"doc":"City, country or IANA zone name.","default":null},{"name":"all","type":"boolean","required":false,"doc":"Return every matching zone instead of refusing an ambiguous one.","default":"`false`"}],"examples":[{"mode":"tz_for_place","place":"Mumbai"},{"mode":"tz_for_place","place":"Europe/Berlin"},{"mode":"tz_for_place","place":"Portugal","all":true},{"mode":"tz_for_place","place":"Australia"},{"mode":"tz_for_place","place":"Atlantis"}]},{"name":"tz_for_coords","purpose":"The zone nearest a pair of coordinates.","description":"Finds the timezone whose reference city is closest to the given coordinates, and returns the two next-closest as alternatives with their distances. This is a nearest-city heuristic, not a boundary lookup — the response warns as much, and near a border you should verify with a shapefile-based service. Coordinates off the globe (`lat` outside −90..90, `lon` outside −180..180) are refused.","parameters":[{"name":"lat","type":"number","required":true,"doc":"Latitude in decimal degrees.","default":null},{"name":"lon","type":"number","required":true,"doc":"Longitude in decimal degrees.","default":null},{"name":"point","type":"string \\| array \\| object","required":false,"doc":"Alternative to `lat`/`lon`: `{lat, lon}`, `[lat, lon]` or `\"lat,lon\"`.","default":null}],"examples":[{"mode":"tz_for_coords","lat":22.5726,"lon":88.3639},{"mode":"tz_for_coords","lat":40.7128,"lon":-74.006},{"mode":"tz_for_coords","lat":"north","lon":88.36}]},{"name":"distance","purpose":"Great-circle distance and bearing between two points.","description":"Haversine distance between two points, returned in kilometres, miles, nautical miles and metres, with the initial bearing in degrees and as a compass point. Endpoints may be `{lat, lon}`, `[lat, lon]`, `\"lat,lon\"` or a place leftbrain has coordinates for. A name it only knows a *timezone* for is refused with `needs`, not approximated: Delhi and Mumbai both sit in Asia/Kolkata, so substituting that zone's reference city put them 0 km apart. This is straight-line distance, never driving distance.","parameters":[{"name":"origin","type":"string \\| array \\| object","required":true,"doc":"Origin: coordinates, or a place leftbrain has coordinates for. A name it only knows a *timezone* for is refused rather than approximated.","default":null},{"name":"destination","type":"string \\| array \\| object","required":true,"doc":"Destination: coordinates or a place name.","default":null}],"examples":[{"mode":"distance","origin":"Delhi","destination":"Mumbai"},{"mode":"distance","origin":[19.076,72.8777],"destination":[28.6139,77.209]},{"mode":"distance","origin":"12.9716,77.5946","destination":"13.0827,80.2707"},{"mode":"distance","origin":"Kolkata","destination":"London"},{"mode":"distance","origin":"Australia","destination":"Kolkata"}]},{"name":"country","purpose":"Every zone a country spans.","description":"Resolves a country by ISO code, name or common alias and lists all of its time zones with their current offsets, plus `single_timezone` — the flag that decides whether “what time is it there?” has one answer.","parameters":[{"name":"country","type":"string","required":true,"doc":"ISO code, country name, or a common alias like `UK` or `USA`.","default":null}],"examples":[{"mode":"country","country":"IN"},{"mode":"country","country":"New Zealand"},{"mode":"country","country":"Freedonia"}]},{"name":"zone_info","purpose":"Details of one IANA zone.","description":"Returns the current offset, abbreviation, DST state, member countries, reference coordinates, tzdata comment and current local time for one zone. Only real IANA names are accepted — abbreviations are refused here as everywhere else.","parameters":[{"name":"zone","type":"string","required":true,"doc":"An IANA zone name, e.g. `Asia/Kolkata`.","default":null}],"examples":[{"mode":"zone_info","zone":"Asia/Kolkata"},{"mode":"zone_info","zone":"America/New_York"},{"mode":"zone_info"}]}]}