A Day Has Only 24±1 Hours: import pytz
Handle easily all those timezone issues your system knows about. Fear those it doesn't. Many people in Central Europe complain about two clock changes per year in March and in October. While this is currently not an issue in Sankt Peterburg, you may still have to manipulate dates from the years there was a Daylight Saving Time. All these changes are known in advance and your system handles them without problems. As a developer, you should probably fear more all the clock changes you don’t know about… After a short overview of the standard datetime module and its usage in different geographical contexts, we’ll have a look at the pytz library and discover all the 591 timezones it comes with. We’ll see why pytz is not a part of the standard library, as well as when and how and why this package gets frequent updates. At the end we'll have a look at a few pitfalls that may make you avoid timezones altogether.
Senior Software Architect
Born in Czechoslovakia, studied in France, living in Germany. Senior Software Architect at UBIMET GmbH. Using Python to make the sun shine and the wind blow. Imports from pandas and asyncio, enjoys discovering the chaotic world of unicode and time zones.