[tz] Reason for removal of several TZ abbreviations

Guy Harris guy at alum.mit.edu
Tue Dec 5 21:29:20 UTC 2017


On Dec 5, 2017, at 12:35 PM, Brian Inglis <Brian.Inglis at systematicsw.ab.ca> wrote:

> Not hard to put together a script using a "what is my external IP address"
> script that accesses an external web server to return your system's public
> address, geoiplookup, and tzselect -n 1 -c latlong, although YMMV.

That's a start, but if it determines you're in San Simon, Arizona:

	https://en.wikipedia.org/wiki/San_Simon,_Arizona

it gets it wrong:

	$ ksh ./tzselect.ksh -n 1 -c +3216-10913
	Please identify a location so that time zone rules can be set correctly.
	Please select one of the following time zone regions,
	listed roughly in increasing order of distance from +3216-10913.
	1) Mexico - Mountain Standard Time - Sonora
	#? 

So, for doing a script to do the equivalent of what macOS and iOS do, you'd want more like "get your external IP address, geolocate it, and hand it to a program with a set of shapefiles for tzdb regions".  See, for example

	https://github.com/evansiroky/timezone-boundary-builder

(to which

	http://efele.net/maps/tz/world/

now refers people).


More information about the tz mailing list