Hacker News new | ask | show | jobs
by prussian 1956 days ago
tzset manpage for glibc explains this:

         If  the file specification filespec is omitted, or its value cannot be interpreted, then Coordi‐
       nated Universal Time (UTC) is used.  If filespec is given, it specifies another tzfile(5)-format
       file  to  read  the  timezone information from.  If filespec does not begin with a '/', the file
       specification is relative to the system timezone directory.  If the colon is omitted each of the
       above TZ formats will be tried.
1 comments

Ok, so the key quote here: "If the colon is omitted each of the above TZ formats will be tried."

So even if someone finds this sentence somehow this is still underspecified. The full logic seems to be for a TZ that doesn't start with ':' :

1. First format tried, if it fails...

2. ...interpret TZ as filespec, if it fails...

3. ...interpret TZ as std with offset 0.

Note that there is fallback parsing of TZ that is not described at all (essentially 3rd and 4th formats), and two fallbacks, not one.