Created
May 18, 2021 02:38
-
-
Save artisandhq/f1bd9e3f3c41afc5cfed921a5d26dced to your computer and use it in GitHub Desktop.
Django make aware datetime
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
d = datetime.datetime.now() | |
timezone = pytz.timezone("Asia/Taipei") | |
d_aware = timezone.localize(d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment