Fix pbs_time function