<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>This is very tough, because there are a lot of plausible subsets
      that someone could want, and there are not good names for them all
      (nor, it seems, do they all have a foolproof method of detection).
      I'd say one could easily want:<br>
      <br>
      1. Every valid value for key that doesn't raise an error when you
      call ZoneInfo(key)<br>
      2. All the values found in tzdata.zi<br>
      3. The intersection of the values found in tzdata.zi and the keys
      that actually exist on disk<br>
      4. All the values from zone.tab and/or zone1970.tab<br>
      5. The intersection of #4 and all the keys that actually exist on
      disk<br>
      6. #4 or #5, but also including "UTC" (and possibly the
      fixed-offset zones like Etc/GMT+5 or whatever)<br>
      <br>
      My inclination would be to compile a list of zones annotated with
      each entry's membership in each of these groups and let the end
      user filter as desired, but that's slightly complicated by the
      fact that almost all the indicators other than #1 may be
      manipulated by the install mechanism, and it becomes hard to
      distinguish between "not present in tzdata.zi" and "tzdata.zi not
      shipped".<br>
      <br>
      That said, it sounds to me like we can probably safely say that it
      is unlikely that we won't have to special case any names of
      folders or files <i>other</i> than posixrules, posix/ and right/
      for the foreseeable future and that if distros rename those files
      but still put them under the zoneinfo root, that's probably safely
      considered a bug in the distro.<br>
      <br>
      I'm still mildly uncertain as to whether it's possible that
      tzdata.zi might have more zones than are actually installed (for
      example if a distro doesn't install anything in backward or
      antarctica for some reason).</p>
    <p>With regards to this:<br>
      <br>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">If you also want the leap-second entries, you'll need the right/* entries though.</pre>
      </blockquote>
    </p>
    <p>Is it always the case that the right/ and posix/ trees are
      identical to the primary tree? If so, it's reasonable to leave
      right/ and posix/ out of the listings and users can know that if
      they want the right/* entries, they can just prepend "right/" to
      any given key.<br>
      <br>
      Best,<br>
      Paul<br>
      <br>
    </p>
    <div class="moz-cite-prefix">On 5/15/20 9:43 AM, Filipe Laíns wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:c0b73bf951306f14c5b476e5a5c92dce0700720f.camel@archlinux.org">
      <pre class="moz-quote-pre" wrap="">On Wed, 2020-05-13 at 19:13 -0700, Paul Eggert wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Yup. The method I'd suggest is tzdata.zi if available, or the "shorter list"
mentioned above, whichever's faster. This is because zone1970.tab and zone.tab
don't list some of the duplicates, and some users like the duplicates.

If you also want the leap-second entries, you'll need the right/* entries though.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
I am thinking the best approach should be reading tzdata.zi when
available, and potentially fallback to ignoring posix/* and
right/* and posixrules. I am not sure about this last one though, for
reasons outlined in the PR. What do you think Paul (G.)?

Filipe Laíns
</pre>
    </blockquote>
  </body>
</html>