It's time for datetime by Mario Corchero

Painless working with time in python

Abstract

Working with time is not a trivial challenge. Python includes a native module in the standard library to work with it but datetime keeps being together with unicode a common source of errors. This often leads to the widespread of many other libraries in the attempt of easing the work of working with datetime. Datetime is one of those API that looks easy to use but given the many concepts around time, is it easy to get backfired if the developer has not solid knowledge about the them.

In this talk we will overview the main concepts about timestamps represented through datetime objects, the limitations on the standard library and some simple steps to try to avoid the common mistakes that everyone can fall into.

Naive datetimes (which the datetime API works by default with) are a great tool to represent calendar times, but when talking about timestamps (focus of this talk) timezones is n essential part of it and the datetime module can be tricky to use for that use cases.

We will also speak about different standards of time, time zones, Daylight Saving Times, leap seconds, serialization and datetime arithmetics.

The talk will be focused on giving the foundations that everyone knows to be able to understand and work efficiently and without making painful mistakes when dealing with time related algorithms.

Description

Audience

All developers face a time when they have to work with datetime. This is clearly not a simple domain to just jump in to. The talk will help beginners and intermediate developers to understand and don’t subestimate the complexity of working with time. The most experiences developers will also have some take aways and pointers to further their grasp of this tricky field and gain confidence on their daily usage of time related libraries.

The talk will include explanations of what “time” actually means and how can we represent it in python. You don't need to be an expert in datetime nor ISO standards, the attendees will leave understanding the complexity of time, the main concepts behind datetime and a list of tips to represent timestamps with datetime in a painless way. The talk will also include pointers to solutions for more complex problems like leap seconds, the fold attribute, etc.

Key Takeaways: