Fix ConvertTimestamp
This commit is contained in:
parent
72b2e77414
commit
42c2963bf0
@ -412,10 +412,10 @@ def CalculateLength(s):
|
|||||||
|
|
||||||
|
|
||||||
def ConvertTimestamp(timestamp):
|
def ConvertTimestamp(timestamp):
|
||||||
timestamp = round(timestamp*100.0)/100.0
|
timestamp = round(timestamp*100.0)
|
||||||
hour, minute = divmod(timestamp, 3600)
|
hour, minute = divmod(timestamp, 360000)
|
||||||
minute, second = divmod(minute, 60)
|
minute, second = divmod(minute, 6000)
|
||||||
centsecond = second-int(second)
|
second, centsecond = divmod(second, 100)
|
||||||
return '%d:%02d:%02d.%02d' % (int(hour), int(minute), int(second), int(centsecond))
|
return '%d:%02d:%02d.%02d' % (int(hour), int(minute), int(second), int(centsecond))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user