On Wed, Oct 28, 2015 at 11:52 AM, Brian Inglis <Brian.Inglis@systematicsw.ab.ca> wrote:
On 2015-10-21 13:34, Tim Parenti wrote:
FYI, last month, Google released and open-sourced cctz <https://github.com/google/cctz>, a new time zone library for C++.

My favorite quote from the announcement <http://google-opensource.blogspot.com/2015/09/introducing-cctz-simple-time-zone.html> on their Open Source Blog:

    /"Time zones are logical and easy to use." —no one ever/

Don'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't cause many problems! ;^>

I'm not sure what that means precisely, but I'm happy to discuss it.

For what it's worth, at the conceptual level cctz is mostly just a C++ binding akin to TZ's newctime(3) functions.  They both provide support for:

civil_time = f(absolute_time, time_zone)
absolute_time = g(civil_time, time_zone)

In cctz, f() and g() are spelled BreakTime() and MakeTime() respectively.  In TZ they are localtime_rz() and mktime_z().
 
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?