Skip to content

Instantly share code, notes, and snippets.

View pganssle's full-sized avatar
👨‍💼
Acclimating to new job, full bore FOSS contributions should resume soon.

Paul Ganssle pganssle

👨‍💼
Acclimating to new job, full bore FOSS contributions should resume soon.
View GitHub Profile

Intro

Most of us have faced a point when trying to make things work with the Python datetime module by just trying things around. Datetime is one of those APIs 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 is a standard that defines how we can measure units of time. The same way we have standards to measure weight or length that define kilograms or meters, we need a way to accurately define what