I am trying to understand the nature of epoch, and its behavior. Below I tried the same date with 2 different timezone specific datetime with 1 naive datetime
import time
import pytz
from datetime import datetime, timedelta
pst = pytz.timezone('America/Los_Angeles')
t = datetime(year=2015, month=2, day=2)
t = pst.localize(t)
time.mktime(t.timetuple())
# outputs 1422864000.0
utc = pytz.utc
k = datetime(year=2015, month=2, day=2)
k = utc.localize(k)
time.mktime(k.timetuple())
# outputs 1422864000.0
o = datetime(year=2015, month=2, day=2)
time.mktime(o.timetuple())
# outputs 1422864000.0
They all have the same epoch, but this is surprising, since the same date in pst should be offset by 7 hours in reference to utc. Can someone explain this?
Thanks