I'm trying to convert a UNIX time stamp to UTC+9. I've been searching for hours and it's all very confusing what with the different libraries etc
Here's what I've got so far
from datetime import datetime from pytz import timezone import datetime time = 1481079600 utc_time = datetime.datetime.fromtimestamp(time)#.strftime('%Y-%m-%d %H:%M:%S') print utc_time.strftime(fmt) tz = timezone('Japan') print tz.localize(utc_time).strftime(fmt) This just prints the same time, what am I doing wrong