<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 28, 2015 at 11:52 AM, Brian Inglis <span dir="ltr">&lt;<a href="mailto:Brian.Inglis@systematicsw.ab.ca" target="_blank">Brian.Inglis@systematicsw.ab.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2015-10-21 13:34, Tim Parenti wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FYI, last month, Google released and open-sourced cctz &lt;<a href="https://github.com/google/cctz" rel="noreferrer" target="_blank">https://github.com/google/cctz</a>&gt;, a new time zone library for C++.<br>
<br>
My favorite quote from the announcement &lt;<a href="http://google-opensource.blogspot.com/2015/09/introducing-cctz-simple-time-zone.html" rel="noreferrer" target="_blank">http://google-opensource.blogspot.com/2015/09/introducing-cctz-simple-time-zone.html</a>&gt; on their Open Source Blog:<br>
<br>
    /&quot;Time zones are logical and easy to use.&quot; —no one ever/<br>
</blockquote>
<br>
Don&#39;t think that project will help much, as the zone is not part of the opaque structure, but is a separate parameter in their API: that won&#39;t cause many problems! ;^&gt;<br></blockquote><div><br></div><div>I&#39;m not sure what that means precisely, but I&#39;m happy to discuss it.</div><div><br></div><div>For what it&#39;s worth, at the conceptual level cctz is mostly just a C++ binding akin to TZ&#39;s newctime(3) functions.  They both provide support for:</div><div><br></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><font face="monospace, monospace">civil_time = f(absolute_time, time_zone)</font></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><font face="monospace, monospace">absolute_time = g(civil_time, time_zone)</font></div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>In cctz, <font face="monospace, monospace">f()</font> and <font face="monospace, monospace">g()</font> are spelled BreakTime() and MakeTime() respectively.  In TZ they are localtime_rz() and mktime_z().</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If we think back 15+ years, many problems were due to messing around with sub-chunks of dates, whether string, integer, or bits, instead of using the APIs provided to convert from one date representation to another. Is it September again in the date/time domain?</blockquote></div></div></div>