Use time deltas to convert milliseconds into duration. http://docs.python.org/2/library/datetime.html#datetime.timedelta
from datetime import timedelta
# Convert 600000ms (10 minutes) back to duration value.
milliseconds = timedelta(milliseconds=600000)
print milliseconds
# 0:10:00