Switch to python 3

- #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2019-12-28 18:52:19 +01:00
parent dc77a8c457
commit 3f3c4c3108

View file

@ -25,10 +25,10 @@
#
###############################################################################
from __future__ import print_function
import sys
import json
import datetime
import json
import sys
from dateutil import tz
DATEFORMAT = "%Y%m%dT%H%M%SZ"
@ -40,8 +40,8 @@ def format_seconds(seconds):
Convert seconds: 3661
To formatted: " 1:01:01"
"""
hours = int(seconds / 3600)
minutes = int(seconds % 3600 / 60)
hours = seconds // 3600
minutes = seconds % 3600 // 60
seconds = seconds % 60
return "{:4d}:{:02d}:{:02d}".format(hours, minutes, seconds)