removing date.today and replacing with timezone.now
This commit is contained in:
@@ -347,7 +347,7 @@ from datetime import date
|
||||
|
||||
def calculate_age(born,today=None):
|
||||
if not today:
|
||||
today = date.today()
|
||||
today = timezone.now()
|
||||
if born:
|
||||
try:
|
||||
return today.year - born.year - ((today.month, today.day) < (born.month, born.day))
|
||||
|
||||
Reference in New Issue
Block a user