Add utils method for time conversion.