[tz] question regarding 'timezone' variable

Christos Zoulas christos at zoulas.com
Wed Sep 2 15:15:36 UTC 2015


On Sep 2,  7:47am, eggert at cs.ucla.edu (Paul Eggert) wrote:
-- Subject: Re: [tz] question regarding 'timezone' variable

| I assume you mean strftime, not strptime, as there's no strptime in tzcode.

I was looking at the strptime implementation on NetBSD and forgot that this
was not part of tzcode. I will see how to fix that code not to set TM_ZONE
to NULL in some cases.

| 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 
| this area.

Right, thanks I like this patch...

christos


More information about the tz mailing list