mirror of
https://github.com/wassname/flask-security.git
synced 2026-10-30 13:20:19 +08:00
Get rid of strftime in favor of total_seconds. Fixes #67
This commit is contained in:
1 parent
9726726e5a
commit
6adc26a897
1 file changed
+1
-1
@@ -196,7 +196,7 @@ def config_value(key, app=None, default=None):
|
||||
def get_max_age(key, app=None):
|
||||
now = datetime.utcnow()
|
||||
expires = now + get_within_delta(key + '_WITHIN', app)
|
||||
return int(expires.strftime('%s')) - int(now.strftime('%s'))
|
||||
return (expires - now).total_seconds()
|
||||
|
||||
|
||||
def get_within_delta(key, app=None):
|
||||
|
||||
Reference in new issue
Block a user