checked return values for time, ctime