[patch] time/tzset.c: Fix problem with missing /etc/localtime showing wrong TZ
Ben Collins
bcollins@debian.org
Tue Jan 2 17:29:00 GMT 2001
If env TZ is not set, and /etc/localtime is not present, then the
timezone showed up as "/etc/localtime" instead of the default UTC, as
the code tries to do. This patch fixes that issue.
One odd thing I saw here, is that all the tests for tz == NULL (other
than the first test after getenv()) are superflous, since the only way
that tz can be NULL, is if TZ is not set, and TZDEFAULT itself is
defined as NULL. Assuming that TZDEFAULT is never going to be NULL,
could reduce some code here. Is that a safe assumption?
2001-01-02 Ben Collins <bcollins@debian.org>
* time/tzset.c: tzset_internal(): Make sure we fall back to UTC
if TZ is not set and TZDEFAULT is not present.
--
-----------=======-=-======-=========-----------=====------------=-=------
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
More information about the Libc-alpha
mailing list