[Fix]修复QuantosDataService夜盘数据时间戳可能为负的bug

This commit is contained in:
vn.py 2018-01-29 15:25:46 +08:00
parent 0b5d0a928c
commit 1a01937e6c

View File

@ -66,7 +66,12 @@ def generateVtBar(row):
sec=bar.time[4:6] sec=bar.time[4:6]
if minute=="00": if minute=="00":
minute="59" minute="59"
hour=str(int(hour)-1).rjust(2,'0')
h = int(hour)
if h == 0:
h = 24
hour=str(h-1).rjust(2,'0')
else: else:
minute=str(int(minute)-1).rjust(2,'0') minute=str(int(minute)-1).rjust(2,'0')
bar.time=hour+minute+sec bar.time=hour+minute+sec