fix bugs for clock_time function.