<div dir="ltr">Somewhat related to truncation:<div>settzname function [1] calls update_tzname_etc with all time types and</div><div>all transitions. Shouldn't it be called only for specified local time only i.e.</div><div>where ttunspecified(sp, ...) returns false?</div><div><br></div><div>Setting any value of tzname [2] to "-00" does not look meaningful.</div><div><br></div><div>Do I miss anything here?</div><div><br></div><div>Thanks,</div><div>Almaz</div><div><br></div><div>[1] <a href="https://github.com/eggert/tz/blob/9fa1a5395f48fc5d563af1f58d6a8b787c27de78/localtime.c#L296">https://github.com/eggert/tz/blob/9fa1a5395f48fc5d563af1f58d6a8b787c27de78/localtime.c#L296</a></div><div><br></div><div>[2] <a href="https://github.com/eggert/tz/blob/9fa1a5395f48fc5d563af1f58d6a8b787c27de78/private.h#L545">https://github.com/eggert/tz/blob/9fa1a5395f48fc5d563af1f58d6a8b787c27de78/private.h#L545</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 24 May 2022 at 09:53, Almaz Mingaleev <<a href="mailto:mingaleev@google.com">mingaleev@google.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"><div dir="ltr">Yep, that was the problem. Thanks!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 23 May 2022 at 19:14, Paul Eggert <<a href="mailto:eggert@cs.ucla.edu" target="_blank">eggert@cs.ucla.edu</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">On 5/23/22 04:48, Almaz Mingaleev wrote:<br>
> I think overflow happens somewhere.<br>
> Please see the attached code.<br>
<br>
That test doesn't look right, as each mktime call modifies its argument, <br>
polluting the next test case. Please try the attached test instead, <br>
ported to C. On my platform (Ubuntu 22.04, x86-64) this outputs:<br>
<br>
sizeof time_t: 8<br>
2120284800<br>
2120256000<br>
<a href="tel:(407)%20681-2800" value="+14076812800" target="_blank">4076812800</a><br>
<a href="tel:(407)%20678-4000" value="+14076784000" target="_blank">4076784000</a><br>
<br>
which looks OK.</blockquote></div>
</blockquote></div>