mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-10 20:30:00 +00:00
Manual steps of port to Python 3.
This commit is contained in:
parent
e90d1f38d2
commit
4c047b90e5
@ -1,5 +1,9 @@
|
||||
# ISO-8601:
|
||||
# http://www.cl.cam.ac.uk/~mgk25/iso-time.html
|
||||
"""
|
||||
Time formatting utilities.
|
||||
|
||||
ISO-8601:
|
||||
http://www.cl.cam.ac.uk/~mgk25/iso-time.html
|
||||
"""
|
||||
|
||||
import calendar, datetime, re, time
|
||||
|
||||
@ -74,11 +78,11 @@ def format_delta(time_1, time_2):
|
||||
delta = int(time_2 - time_1)
|
||||
seconds = delta % 60
|
||||
delta -= seconds
|
||||
minutes = (delta / 60) % 60
|
||||
minutes = (delta // 60) % 60
|
||||
delta -= minutes * 60
|
||||
hours = delta / (60*60) % 24
|
||||
hours = delta // (60*60) % 24
|
||||
delta -= hours * 24
|
||||
days = delta / (24*60*60)
|
||||
days = delta // (24*60*60)
|
||||
if not days:
|
||||
if not hours:
|
||||
if not minutes:
|
||||
|
Loading…
x
Reference in New Issue
Block a user