安裝pytz
pip install pytz
獲取國家時區列表
print pytz.country_timezones('cn')
完整例範
from datetime import datetime import pytz now = datetime.now() print now tz = pytz.timezone('America/New_York') nyNow = datetime.now(tz) print nyNow c = tz.localize(now) print c