mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Switch to python 3
- #259 Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
dc77a8c457
commit
3f3c4c3108
1 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue