Browse Source

use builtin total_seconds of timedelta object

pull/2697/head
chenjun 7 years ago
parent
commit
091c21f146
  1. 2
      flask/helpers.py

2
flask/helpers.py

@ -996,7 +996,7 @@ def total_seconds(td):
:returns: number of seconds
:rtype: int
"""
return td.days * 60 * 60 * 24 + td.seconds
return int(td.total_seconds())
def is_ip(value):

Loading…
Cancel
Save