Commit 05272ce5 authored by Mark Caglienzi's avatar Mark Caglienzi
Browse files

Fix last_password_change_days calculation. refs #9972

parent 4fd5d136
......@@ -141,7 +141,7 @@ class UserMixin(OctonetMixin):
last_password_change = epoch + datetime.timedelta(days=shadowLastChange)
if shadowLastChange:
self.user['last_password_change'] = last_password_change.strftime("%Y-%m-%d")
self.user['last_password_change_days'] = _("{} day(s) ago").format((last_password_change - today).days)
self.user['last_password_change_days'] = _("{} day(s) ago").format((today - last_password_change).days)
else:
self.user['last_password_change'] = "-"
self.user['last_password_change_days'] = _("0 day(s) ago")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment