timezone aware
This commit is contained in:
parent
f1790445cd
commit
3701899304
1 changed files with 1 additions and 1 deletions
|
@ -177,6 +177,6 @@ class VMDetail(models.Model):
|
|||
|
||||
def end_date(self):
|
||||
end_date = self.terminated_at if self.terminated_at else timezone.now()
|
||||
months = relativedelta(end_date, self.created_at)
|
||||
months = relativedelta(end_date, self.created_at).months
|
||||
end_date = self.created_at + relativedelta(months=months)
|
||||
return end_date
|
||||
|
|
Loading…
Reference in a new issue