<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">FYI: on Windows 32-bit builds CAN use 64-bit timestamps (by using USE_32BIT_TIME_T macro, see https://msdn.microsoft.com/en-us/library/1f4c8f33.aspx). As far as I know, this
 is not possible on *NIX (my knowledge is limited to Solaris/AIX/HPUX/Linux). I don’t understand how 32-bit time_t systems can survive 2038 and beyond. I’m not sure what this will mean for embedded systems (with e.g. Linux), where 32-bit is still very common.
 That systems then also should have a 64-bit representation for time_t?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Arthur David Olson [mailto:arthurdavidolson@gmail.com]
<br>
<b>Sent:</b> Wednesday, January 11, 2017 23:06<br>
<b>To:</b> Paul Eggert &lt;eggert@cs.ucla.edu&gt;<br>
<b>Cc:</b> Kees Dekker &lt;Kees.Dekker@infor.com&gt;; Time Zone Mailing List &lt;tz@iana.org&gt;<br>
<b>Subject:</b> Re: [tz] question about mktime_tzname()<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&gt; Unfortunately now that I think of it, I see that this can't work on<br>
&gt; hosts with 32-bit time_t, as they can't cover the 400-year span.&nbsp; So the<br>
&gt; code is still broken on 32-bit hosts. Is there a better way to fix the code?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Since 32-bit time_t values can only cover (about) 140 years, not covering a 400-year span's not a bug, it's a given.-)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">(An aside: in the future, my guess is that there'll either be a new, 64-bit-only time zone binary format or that time zone source will be interpreted at run time with no binary format; at that point, a lot of code simplification happens.)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; @dashdashado<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Wed, Jan 11, 2017 at 4:51 PM, Paul Eggert &lt;<a href="mailto:eggert@cs.ucla.edu" target="_blank">eggert@cs.ucla.edu</a>&gt; wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt">On 01/11/2017 01:28 PM, Arthur David Olson wrote:<br>
&gt; When a table generated from an environment variable does indeed cover<br>
&gt; 400 years, both goahead and goback should be set.<br>
<br>
The localtime.c code in question tries to do that sort of thing, as it says:<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yearlim = EPOCH_YEAR &#43; YEARSPERREPEAT;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (year = EPOCH_YEAR; year &lt; yearlim; year&#43;&#43;) {<br>
<br>
and YEARSPERREPEAT is 400.<br>
<br>
Unfortunately now that I think of it, I see that this can't work on<br>
hosts with 32-bit time_t, as they can't cover the 400-year span.&nbsp; So the<br>
code is still broken on 32-bit hosts. Is there a better way to fix the code?<br>
<br>
Also, I'm puzzled as to why the first transition in 1970 was being<br>
omitted, as that leads me to worry that the above code will generate one<br>
transition shy of 400 years' worth even on 64-bit hosts.<o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>