datetime makes it easy between fromtimestamp , timedelta and timestamp :
>>> import datetime >>> orig = datetime.datetime.fromtimestamp(1425917335) >>> new = orig + datetime.timedelta(days=90) >>> print(new.timestamp()) 1433693335.0
In Python 3.2 and earlier, datetime objects do not have a .timestamp() method, so you should change the last line to a less efficient two-step conversion:
>>> import time >>> print(time.mktime(new.timetuple()))
The two-step conversion on my machine takes ~ 10 times longer than .timestamp() , taking ~ 2.5 Ξs versus ~ 270 ns for .timestamp() ; apparently still trivial if you don't do this, but if you need to do this, consider another argument for using modern Python. :-)
Shadowranger
source share