Created
June 17, 2024 15:47
-
-
Save jaraco/90546a18c513b8ea399be2cdde9323e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ @ pip-run pytz -- -q | |
>>> import pytz | |
>>> import datetime | |
>>> est = pytz.timezone('US/Eastern') | |
>>> datetime.datetime(2018, 3, 11, 9, 0, 0, tzinfo=est) - datetime.datetime(2018, 3, 10, 9, 0, 0, tzinfo=est) | |
datetime.timedelta(days=1) | |
>>> est.localize(datetime.datetime(2018, 3, 11, 9, 0, 0)) - est.localize(datetime.datetime(2018, 3, 10, 9, 0, 0)) | |
datetime.timedelta(seconds=82800) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment