关于时区,正确计算时间长度的最佳方法是:
timeLength = datetime.datetime(2012, 1, 1, 0, 0, 0) - datetime.datetime.now()
看看这个链接http://timezones.appspot.com/
datetime.fromtimestamp(raw_timestamp, utc) #might help
python:
from datetime import datetime
import pytz
import calendar
calendar.timegm(pytz.timezone('Europe/Amsterdam').localize(datetime.strptime('2012-12-21 00:00:00', '%Y-%m-%d %H:%M:%S')).utctimetuple())