[tz] Buggy %z behaviour in strftime

Paul Gilmartin PaulGBoulder at AIM.com
Mon Jul 18 17:14:25 UTC 2022


On 7/18/22 10:03:11, Paul Eggert via tz wrote:
> On 7/18/22 03:04, Michael H Deckers via tz wrote:
>>
>>      By the way, the draft standard seems to be defective in that
>>      it does not state that strftime() also looks at the members
>>      .tm_year, .tm_mon, tm_mday, .tm_hour, .tm_min, .tm_sec
>>      for printing %z or %Z -- one cannot determine the offset
>>      or the time zone abbreviation without knowing the timestamp.
> 
> Good point, and POSIX and the C standard are both wrong here. 
 >
It may be worse.  I read somewhere (citation needed) that in
SMTP Date: headers a signed value indicates a geographic
longitude; unsigned 0000 merely UTC with location
unspecified.

-- 
gil



More information about the tz mailing list