Made changes to time functions according to the changes to O