From b486658fb0edae37c7a6aa0eb11d980e3b19273a Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Fri, 5 Jan 2018 12:33:35 +0800 Subject: [PATCH] [Fix]Close #646 --- examples/QuantosDataService/dataService.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/QuantosDataService/dataService.py b/examples/QuantosDataService/dataService.py index dd6717e7..5d3268ee 100644 --- a/examples/QuantosDataService/dataService.py +++ b/examples/QuantosDataService/dataService.py @@ -56,7 +56,10 @@ def generateVtBar(row): bar.volume = row['volume'] bar.date = str(row['trade_date']) - bar.time = str(row['time']) + if row['time'] == 0: + bar.time = '00:00:00' + else: + bar.time = str(row['time']) bar.datetime = datetime.strptime(' '.join([bar.date, bar.time]), '%Y%m%d %H%M%S') return bar