From 394fde905d8c0d5ad37ef57d72360795bce53ed8 Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Sun, 13 Oct 2013 13:03:09 +0800 Subject: [PATCH] Fix ConvertTimestamp bug --- danmaku2ass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/danmaku2ass.py b/danmaku2ass.py index ac27058..d2d1e4f 100755 --- a/danmaku2ass.py +++ b/danmaku2ass.py @@ -202,7 +202,7 @@ def ReadCommentsSH5V (f, fontsize): def ConvertTimestamp(timestamp): hour, minute = divmod(timestamp, 3600) minute, second = divmod(minute, 60) - centsecond = round(second*100.0) + centsecond = round((second-int(second))*100.0) return '%d:%02d:%02d.%02d' % (int(hour), int(minute), int(second), centsecond)