"Time zones are logical and easy to use." -- No one ever
Time programming is notoriously difficult and error prone. Attempts at handling daylight-saving time, for example, often yield baffling code, which of course is explained by a similarly misguided comment. Programmer confusion can spread virally throughout the codebase when these misconceptions find their way into library interfaces.
The problem is not that dates and times are fundamentally complicated (though they are). The problem is the lack of a simplified mental model with library support. This would give programmers the concepts and vocabulary necessary to reason about and discuss these concepts, and the ability to express this reasoning in simple C++ terms.
In this talk I will show how date and time programming evolved into what it is today. I will present a greatly simplified mental model that applies to all programming languages. I will show clear examples using an open source C++ library that implements these simplified concepts. And I will present practical tips for proper time hygiene that should be used by everyone immediately.
Co-author of the open-source CCTZ library (github.com/google/cctz). Co-author of two proposals that are trying to push the concepts from CCTZ into the C++ standard.
Tuesday September 22, 2015 9:00am - 10:00am PDT
Six (406)Meydenbauer Center