Use same tzinfo as the time parser to avoid TypeError from being thrown
This commit is contained in:
1 parent
bf743087d2
commit
d3d89f754b
1 file changed
+1
-1
@@ -13,7 +13,7 @@ def password_expires_in(datestr):
|
||||
if not expdate:
|
||||
return sys.maxint
|
||||
|
||||
delta = expdate - datetime.datetime.now()
|
||||
delta = expdate - datetime.datetime.now(ipautil.GeneralizedTimeZone())
|
||||
return delta.days
|
||||
|
||||
def password_is_expired(days):
|
||||
|
||||
Reference in new issue
Block a user