Comparing datetimes in Python

You always want to convert datetime objects to UTC before comparing them. Why is that, you ask? I am sure there are plenty of other reasons, but we recently discovered a serious footgun at work: Comparing “timezone-based” datetime objects fails during DST transition! I will explain this using the DST transition from CEST to CET in Germany (the is the transition on the last Sunday in October, from “Sommerzeit” to “Winterzeit”, where wall clocks are turned back one hour), so our timezone is "Europe/Berlin". ...

October 28, 2025 · 4 min

Running a Webservice, Part 1: Creating the App

Intro This is a mini-series describing how to set up a simple webservice. I’ll try to cover as much as possible from the whole service lifecycle, from developing the app itself to actually running and maintaining it. This contains at least the following steps (not necessarily in that order): Develop the app Write tests Containerize the app Set up CI/CD Run the app This list will probably change as I make progress and shall be updated accordingly. ...

August 1, 2021 · 6 min