[tz] question regarding 'timezone' variable
eggert at cs.ucla.edu
Wed Sep 2 14:47:51 UTC 2015
Christos Zoulas wrote:
> Okay, but we should fix the NULL cases in strptime() then so that TM_ZONE
> is never NULL?
I assume you mean strftime, not strptime, as there's no strptime in tzcode.
I guess the strftime code was written to be portable to localtime
implementations that have tm_zone but set it to NULL, and also have tzname and
set it correctly. I'm pretty sure there are no such implementations; certainly
tzcode itself doesn't do that. The idea of tm_zone and tm_gmtoff
implementations not knowing the time zone is problematic; even if tm_zone ==
NULL would denote that, what value would tm_gmtoff be set to? Also, since
release 2014g, zdump has not worked with such implementations but nobody has
reported problems with it. So the attached proposed patch removes this
unnecessary complication, making strftime.c behave as zdump.c already does in
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1779 bytes
Desc: not available
More information about the tz