Here's my Python code:
import pytz
from datetime import datetime
tz = pytz.timezone('US/Pacific')
now_local = datetime.now().replace(tzinfo=tz)
print("now_local: {}".format(now_local))
It prints this output:
now_local: 2018-11-13 12:06:03.255983-07:53
which is odd because I believe the timezone offset should be -08:00
instead of -07:53
. I'm pretty sure that the timezone offset of US Pacific is 8 hours.
Am I missing something?
I'm on Python version 2.7.14 and Pytz version 2018.4