> I disagree with the full-featured support of tzset() for all TZ paths.
> 
> and, of course your private Monticello file is corrupt TZ file, which 
> exercises
> a secret bug in the libc/time parser of the file, and you rely upon it to take
> over control of this program, and other programs.
> 
> 
> I despise this "feature".  It basically says that tzset() requires full
> filesystem access during the whole program lifetime.

I agree.  Anyone who's not actually developing time zone files should be
plenty happy using what exists, or at worst lobbying a sysadmin to add a TZ
file to /usr/share/zoneinfo.  I think this feature exists only for
historical developer convenience.  Otherwise it's just exposure surface.

My issues with the time system are (a) it has to "just work", so it flees
to UTC the instant something goes wrong, but never makes available any
status as to whether the asked-for time zone is the one returned, except
for (b) my program aborts if I'm pledged and I go do something silly with
the TZ.

If the answer to (b) is "don't do silly things", I can live with that,
although in that case I'd think the best answer would be to "just work" and
default to UTC like everything else, rather than aborting -- just like our
setugid() programs do (grdc is now, interestingly, a program that aborts on
localtime() if TZ is outside zoneinfo... unless you make grdc setgid first,
then it works).  Sadly I can't promise I'll stop doing silly things.  But I
have no issue breaking with tradition, revising the documentation, and
insisting that valid TZs are only relative paths inside zoneinfo.

For (a), the issue is that I don't think grdc should display $TZ if TZ is
an invalid timezone or at least not the timezone being used.  Sadly, grdc
has no easy way of telling.  If only there were some API to tell.

Further with grdc, I'd really like it if the string being displayed were
not necessarily all of $TZ, but limited to up to the last <n> characters
(the end of the time zone string being more interesting than the start),
for n on the order of 40.



Paul Janzen.

Reply via email to