|
Just like people don't use the http module but requests, it's been years since the community moved away from manual manipulation of datetime/pytz for time zones. Nowadays people use higher level libs such as pendulum: >>> print(pendulum.datetime(2019, 5, 21, 12, 30, tz='America/New_York'))
2019-05-21T12:30:00-04:00
It avoids many gotchas, gives you more features and has a nicer API.Like skilpat said, dateutil is a better fit that pytz, and hence pendulum uses it, as well as pytzdata, to stay up to date. |
Your assertion reminded me of this funny dialog about JS: https://hackernoon.com/how-it-feels-to-learn-javascript-in-2...