refractored time.to_s