<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>All,</p>
    <p>(sending to <a class="moz-txt-link-abbreviated" href="mailto:tz@iana.org">tz@iana.org</a> since <a class="moz-txt-link-abbreviated" href="mailto:tzdist@ietf.org">tzdist@ietf.org</a> appears to be dead)<br>
    </p>
    <p>I was bored today (actually avoiding "real" work) and was playing
      around with the <a href="http://efele.net/maps/tz/world/">ESRI
        shapefile for timezones</a><br>
    </p>
    I hacked up a quick extension to my tzdist implementation using the
    tz_world shapefile and basic ray tracing to be able to query a time
    zone by geo coordinates, similar to what Google offers in their Time
    Zone API.  Note that I have yet to spend any time writing code to
    account for "holes" in time zones like the Navajo Reservation in
    Arizona.<br>
    <br>
    I modeled the extension after the "find" action in RFC 7808 but with
    lat/long query params rather than a glob pattern.  A request and
    response for the timezone in which my home is located looks
    something like this:<br>
    <br>
    <br>
    GET /tzdist/zones?latitude=43.070833&amp;longitude=-78.831667
    HTTP/1.1<br>
    <br>
    <pre>{
  "synctoken": "890939292-1466089793",
  "timezones": [
    {
      "tzid": "America/New_York",
      "etag": "6602582-1466089793",
      "last-modified": "2016-06-16T15:09:53Z",
      "publisher": "IANA Time Zone Database",
      "version": "2016e",
      "aliases": [
        "US/Eastern"
      ]
    }
  ]
}</pre>
    <br>
    <br>
    The definition of the extension looks like this in the capabilities
    response:<br>
    <br>
    <pre>    {
      "name": "geolocate",
      "uri-template": "/zones{?latitude,longitude}",
      "parameters": [
        {
          "name": "latitude",
          "required": true
        },
        {
          "name": "longitude",
          "required": true
        }
      ]
    }
</pre>
    <br>
    Currently my code only accepts coordinates in decimal degrees, but I
    think it should probably support ISO 6709 formats.<br>
    <br>
    Is this something that folks would like to see documented as a
    formal extension to tzdist, either as specified above or with some
    modification?  If so, I'd be willing to write it up as a draft and
    then move it through IETF in whatever fashion the ADs recommend.<br>
    <pre class="moz-signature" cols="72">-- 
Kenneth Murchison
Principal Systems Software Engineer
Carnegie Mellon University
</pre>
  </body>
</html>