Corrects the bugs of time conversions