Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Creative category for Broken Clock by Amachua
from datetime import datetime, timedelta
import re
def broken_clock(starting_time, wrong_time, error_description):
t1, t2 = map(lambda s:datetime.strptime(s, "%H:%M:%S"), (starting_time, wrong_time))
d1, d2 = map(lambda s:int(s[0])*{'s':1,'m':60,'h':3600}[s[1][0]], re.findall('([-+]?\d+) (second|minute|hour)', error_description) )
return (t1+timedelta(seconds=int((t2-t1).total_seconds()/(d1+d2)*d2))).strftime("%H:%M:%S")
Feb. 24, 2015