From 43526e4999f41e990f2bbbc84a7ee21eeef9f651 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 19 Jun 2008 16:18:49 +0200 Subject: [PATCH] add days to ms2playtime --- oxutils/format.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/oxutils/format.py b/oxutils/format.py index da5eb76..252db09 100644 --- a/oxutils/format.py +++ b/oxutils/format.py @@ -172,6 +172,10 @@ def ms2playtime(ms): ss = it % 60 mm = ((it-ss)/60) % 60 hh = ((it-(mm*60)-ss)/3600) % 60 + if hh >= 24: + dd = int(hh / 24) + hh = hh % 24 + playtime= "%d:%02d:%02d:%02d" % (dd, hh, mm, ss) if hh: playtime= "%02d:%02d:%02d" % (hh, mm, ss) else: