Fixed #21256 -- Error in datetime_safe.datetime.combine.
This commit is contained in:
parent
589dc49e12
commit
d9b6fb8f61
|
@ -19,8 +19,11 @@ class datetime(real_datetime):
|
||||||
def strftime(self, fmt):
|
def strftime(self, fmt):
|
||||||
return strftime(self, fmt)
|
return strftime(self, fmt)
|
||||||
|
|
||||||
def combine(self, date, time):
|
@classmethod
|
||||||
return datetime(date.year, date.month, date.day, time.hour, time.minute, time.microsecond, time.tzinfo)
|
def combine(cls, date, time):
|
||||||
|
return cls(date.year, date.month, date.day,
|
||||||
|
time.hour, time.minute, time.second,
|
||||||
|
time.microsecond, time.tzinfo)
|
||||||
|
|
||||||
def date(self):
|
def date(self):
|
||||||
return date(self.year, self.month, self.day)
|
return date(self.year, self.month, self.day)
|
||||||
|
|
Loading…
Reference in New Issue