Python Datetime - The 9 Tips You Shall Know

codeforests
7 min readOct 27, 2020
Photo by William Iven on Unsplash

Introduction

Dealing with date and time are quite common whenever you are writing Python scripts, for instance, the simplest use cases would be logging some events with a timestamp, or saving a file with date and timing info in the file name. It can be challenging when you have more complicated scenarios such as handling time zone, daylight saving and recurrences etc. The built-in…

--

--

codeforests

Resources and tutorials for python, data science and automation solutions