modify time function

modify time function