Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.4.x] Fixed #21256 -- Error in datetime_safe.datetime.combine.

Backport of d9b6fb8 from master
  • Loading branch information...
commit ea04c81d372aaa1b1aebdacefc46735ef9559fb6 1 parent 037ec10
@aaugustin aaugustin authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 django/utils/
7 django/utils/
@@ -19,8 +19,11 @@ class datetime(real_datetime):
def strftime(self, fmt):
return strftime(self, fmt)
- def combine(self, date, time):
- return datetime(date.year, date.month,, time.hour, time.minute, time.microsecond, time.tzinfo)
+ @classmethod
+ def combine(cls, date, time):
+ return cls(date.year, date.month,,
+ time.hour, time.minute, time.second,
+ time.microsecond, time.tzinfo)
def date(self):
return date(self.year, self.month,

0 comments on commit ea04c81

Please sign in to comment.
Something went wrong with that request. Please try again.