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