Actually, timezones are a bit trickier than that... You may have timezones with the same offset but with different settings when it comes to power saving dates and such (or even nastier behaviours: https://stackoverflow.com/a/6841479/289011)
I think for this specific case, you may be better off with:
>>> "%s" % (datetime.datetime.utcnow() - datetime.timedelta(hours=11))
'2012-12-26 00:25:30.029864'
Just for the year:
>>> "%s" % (datetime.datetime.utcnow() - datetime.timedelta(hours=11)).year
'2012'
Edit:
Yeah, and it's good idea using datetime.utcnow()
, not datetime.now()
... (my bad)