Skip to content

Commit

Permalink
remove pytz library,fix #36
Browse files Browse the repository at this point in the history
  • Loading branch information
ywdblog committed Jun 17, 2019
1 parent 9773c1e commit 9cec78e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python-version/alydns.py
Expand Up @@ -3,7 +3,6 @@
import base64
import urllib
import hmac
import pytz
import datetime
import random
import string
Expand Down Expand Up @@ -63,8 +62,10 @@ def utc_time():
例如,2015-01-09T12:00:00Z(为UTC时间2015年1月9日12点0分0秒)
:return:
"""
utc_tz = pytz.timezone('UTC')
time = datetime.datetime.now(tz=utc_tz).strftime('%Y-%m-%dT%H:%M:%SZ')
#utc_tz = pytz.timezone('UTC')
#time = datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
#time = datetime.datetime.now(tz=utc_tz).strftime('%Y-%m-%dT%H:%M:%SZ')
time=datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
return time

@staticmethod
Expand Down

0 comments on commit 9cec78e

Please sign in to comment.