Created
August 22, 2018 04:36
-
-
Save ciiiii/f40875d230764e61ad481445a8e600ff to your computer and use it in GitHub Desktop.
python get time of one timezone
This file contains 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
import datetime | |
from pytz import timezone | |
now = datetime.datetime.now(tz=timezone('UTC')).astimezone(timezone('Asia/Shanghai')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment