import datetime import time starttime = time.mktime( time.strptime("28-04-2006 14:30:23", "%d-%m-%Y %H:%M:%S") ) durations = [25702, 11245, 8462, 32990, 21601, 3965, 10381] times = [ starttime ] for duration in durations: times.append( times[-1] + duration / 1000.0) for time in times: try: print time, datetime.datetime.fromtimestamp(time) except ValueError, e: print "Error converting %.8f" % time print e