From 5afb45e30699770dde6fc028e94b889fd439c40b Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 9 Jan 2018 10:28:07 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E4=BF=AE=E5=A4=8DQuantosDataService?= =?UTF-8?q?=E5=A4=9C=E7=9B=98=E8=A1=8C=E6=83=85=E6=97=B6=E9=97=B4=E6=88=B3?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/QuantosDataService/dataService.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/QuantosDataService/dataService.py b/examples/QuantosDataService/dataService.py index 5d3268ee..470a3e16 100644 --- a/examples/QuantosDataService/dataService.py +++ b/examples/QuantosDataService/dataService.py @@ -56,10 +56,7 @@ def generateVtBar(row): bar.volume = row['volume'] bar.date = str(row['trade_date']) - if row['time'] == 0: - bar.time = '00:00:00' - else: - bar.time = str(row['time']) + bar.time = str(row['time']).rjust(6, '0') bar.datetime = datetime.strptime(' '.join([bar.date, bar.time]), '%Y%m%d %H%M%S') return bar