Merge pull request #791 from stilet/bugfix_time_spent

fix error format time_spent
This commit is contained in:
Garret Wassermann 2019-12-25 03:40:20 -05:00 committed by GitHub
commit 65943e8623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -161,9 +161,9 @@ def format_time_spent(time_spent):
"""
if time_spent:
time_spent = "{0:02d}h:{0:02d}m".format(
int(time_spent.total_seconds() // 3600),
int((time_spent.total_seconds() % 3600) / 60)
time_spent = "{0:02d}h:{1:02d}m".format(
time_spent.seconds // 3600,
time_spent.seconds // 60
)
else:
time_spent = ""

View File

@ -35,9 +35,9 @@ from .templated_email import send_templated_mail
def format_time_spent(time_spent):
if time_spent:
time_spent = "{0:02d}h:{0:02d}m".format(
int(time_spent.total_seconds() // (3600)),
int((time_spent.total_seconds() % 3600) / 60)
time_spent = "{0:02d}h:{1:02d}m".format(
time_spent.seconds // 3600,
time_spent.seconds // 60
)
else:
time_spent = ""