Get the latest tech news
Timezone-naive datetimes are one of the most dangerous objects in Python
I primarily yell at code. Well, I look sternly in its general direction, gently urging it to do my bidding.
If you don't specify the tz argument, the timestamp is converted to the local date and time of the platform where the code is executed, and this returned datetime object is timezone-naive. Epoch timestamps are, generally, a decent way to perform relative comparisons between two moments in time that satisfy the two following conditions: The epoch returned by time.time() is, as I previously mentioned, timezone-independent, which means that fromtimestamp() has no clue what to attach to the resulting datetime object.
Or read this on Hacker News