The SunOS 5.3 version of tzset() does set these variables: timezone daylight tzname altzone
and it does reset them if TZ is not set properly.
localtime() calls tzset(), so it will change the tzname[] values.
If by "the SunOS 5.3 version of 'tzset()'" you mean the one that comes with SunOS 5.3, that's exactly what I would have expected. The question, though, was whether the "tz94e" version of the code sets the variables in question. If USG_COMPAT is defined, it appears that it does, indeed, set "daylight" and "timezone"; if ALTZONE is defined, it sets "altzone". It appears that it always sets "tzname". All of the above is done in "settzname()", which is called by "tzsetwall()" and "tzset()". Given that, it's not obvious why
1. The Solaris 2.3 strftime gets confused about the timezone when it's linked together with `date'. I don't have the Solaris 2.3 source, so I don't know the details, but my guess is that Solaris 2.3 strftime assumes that tzset sets some global variables in the Solaris 2.3 library, but since we've substituted our own tzset this assumption no longer applies. The symptoms are that `date' prints the correct time but with either "GMT" or "" substituted for the time zone name.
would happen, as both versions of "tzset()" should, it appears, set "tzname[]".