<div dir="ltr">Tried to set tm_isdst to 0 and 1. With glibc and tzcode strftime<div>the result is the same, they print +0000. MacOs works as</div><div>expected - it prints standard and DST offsets.<div>Though when I set it to -1 both glibc and MacOs just skip</div><div>%z. tzcode's implementation replaces %z with +0000 in that</div><div>case.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 18 Jul 2022 at 11:04, Michael H Deckers <<a href="mailto:michael.h.deckers@googlemail.com">michael.h.deckers@googlemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On 2022-07-18 09:34, Almaz Mingaleev via tz wrote:<br>
> Setting tm_gmtoff "fixes" it.<br>
<br>
<br>
<br>
     According to page 366 in the newest C draft standard at<br>
[<a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2912.pdf" rel="noreferrer" target="_blank">https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2912.pdf</a>],<br>
     strftime() looks at the member .tm_isdst for the format patterns<br>
     %z and %Z; but this member was not initialized and is therefore<br>
     "indeterminate", so that the result produced by strftime() may<br>
     be "unspecified".<br>
<br>
     By the way, the draft standard seems to be defective in that<br>
     it does not state that strftime() also looks at the members<br>
     .tm_year, .tm_mon, tm_mday, .tm_hour, .tm_min, .tm_sec<br>
     for printing %z or %Z -- one cannot determine the offset<br>
     or the time zone abbreviation without knowing the timestamp.<br>
<br>
     Michael Deckers.<br>
<br>
</blockquote></div>