bug fix in time-slice

This commit is contained in:
ppwwyyxx
2014-12-22 23:07:36 +08:00
parent f03eb9b5bd
commit 7ee52e32f5
4 changed files with 11 additions and 75 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: render.py
# Date: Mon Dec 22 22:48:32 2014 +0800
# Date: Mon Dec 22 23:07:05 2014 +0800
# Author: Yuxin Wu <[email protected]>
import os
@@ -138,7 +138,7 @@ class HTMLRender(object):
nowtime = slice[0].createTime
if idx == 0 or \
slices[idx - 1][0].createTime.date() != nowtime.date():
timestr = nowtime
timestr = nowtime.strftime("%m/%d %H:%M:%S")
else:
timestr = nowtime.strftime("%H:%M:%S")
blocks.append(self.time_html.format(time=timestr))