[tz] Question about bug seen in OpenBSD and FreeBSD related to tzname

Guy Harris guy at alum.mit.edu
Wed Nov 20 22:08:06 UTC 2019

On Nov 20, 2019, at 12:17 AM, Andras Farkas <deepbluemistake at gmail.com> wrote:

> Hello!  Earlier this month, I noticed bugs in OpenBSD and FreeBSD
> related to tzname's values.
> https://marc.info/?l=openbsd-bugs&m=157379849727998&w=2
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241978

Note that macOS 10.14 does:

	$ ./a.out
	tzname[0]: CAT

for TZ=CAT0 and does

	$ ./a.out
	tzname[0]: CAT
	tzname[1]: DOG


I think the first of those two is at least as valid, if not more valid, than the

	tzname[0]: CAT
	tzname[1]: CAT

claimed for TZ=CAT0 on Linux - the POSIX spec says that tzname[1] should be "dst", but "dst" isn't present.

I think GNU libc, which most Linux distributions use, has its own independent implementation of time routines and tzdb reading, so it's probably not surprising that it doesn't behave the same way that macOS, which uses tzcode-derived code, does.

More information about the tz mailing list