Fix time output so that it is no longer in the past