def replace(self, hour=None, minute=None, second=None, microsecond=None,<EOL>tzinfo=True):
if hour is None:<EOL><INDENT>hour = self.hour<EOL><DEDENT>if minute is None:<EOL><INDENT>minute = self.minute<EOL><DEDENT>if second is None:<EOL><INDENT>second = self.second<EOL><DEDENT>if microsecond is None:<EOL><INDENT>microsecond = self.microsecond<EOL><DEDENT>if tzinfo is True:<EOL><INDENT>tzinfo = self.tzinfo<EOL><DEDENT>return time.__new__(type(self),<EOL>hour, minute, second, microsecond, tzinfo)<EOL>
Return a new time with new values for the specified fields.