Skip to content

Instantly share code, notes, and snippets.

Intro

Most of us have faced a point when trying to make things work with python datetime module by just trying things around. datetime is one of those API that seems easy to use but requires the developer to have a deep understanding of what things actually mean, as otherwise it is really easy to introduce unexpected bugs given the actual complexity of date and time related issues.

Time Standards

The first concept we need to grasp when working with time that we need a standard that defines how we are going to measure it. The same way we have standards to measure weight or lenght that are based on kilograms or meters, we need a way to accurately define what