This commit is contained in:
vn.py 2018-01-05 12:33:35 +08:00
parent d98163f034
commit b486658fb0

View File

@ -56,7 +56,10 @@ def generateVtBar(row):
bar.volume = row['volume'] bar.volume = row['volume']
bar.date = str(row['trade_date']) 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') bar.datetime = datetime.strptime(' '.join([bar.date, bar.time]), '%Y%m%d %H%M%S')
return bar return bar