Fix ConvertTimestamp(1.995)=='0:00:01.100' issue
This commit is contained in:
parent
0ce582d53a
commit
6889f26328
@ -310,10 +310,11 @@ def CalculateLength(s):
|
||||
|
||||
|
||||
def ConvertTimestamp(timestamp):
|
||||
timestamp = round(timestamp*100.0)/100.0
|
||||
hour, minute = divmod(timestamp, 3600)
|
||||
minute, second = divmod(minute, 60)
|
||||
centsecond = round((second-int(second))*100.0)
|
||||
return '%d:%02d:%02d.%02d' % (int(hour), int(minute), int(second), centsecond)
|
||||
centsecond = second-int(second)
|
||||
return '%d:%02d:%02d.%02d' % (int(hour), int(minute), int(second), int(centsecond))
|
||||
|
||||
|
||||
def ConvertType2(row, height, bottomReserved):
|
||||
|
Loading…
Reference in New Issue
Block a user