Stop using utcnow and utcfromtimestamp
If you are the kind of developer who prefers to work in UTC, you may have seen Python's
datetime.utcnow()anddatetime.utcfromtimestamp()methods and thought, "Ah, yes, this is what I should do to work in UTC!" But alas, this is not the best way to work with UTC datetimes. In fact I would say that it is extremely rare that you would want to use either of these functions.
Source: Stop using utcnow and utcfromtimestamp, an article by Paul Ganssle.