I m lost in the tzinfo documentation.
I want to create a datetime object for my location which does not include an adjustment for daylight savings.
此时,我ug笑:
import time
import datetime
now=datetime.datetime.now()
if time.localtime().tm_isdst==1:
now=now+datetime.timedelta(hours=-1)
什么是正确的方式?