updated time to datetime