[Fix]修复QuantosDataService夜盘行情时间戳问题
This commit is contained in:
parent
c842281d47
commit
5afb45e306
@ -56,10 +56,7 @@ def generateVtBar(row):
|
|||||||
bar.volume = row['volume']
|
bar.volume = row['volume']
|
||||||
|
|
||||||
bar.date = str(row['trade_date'])
|
bar.date = str(row['trade_date'])
|
||||||
if row['time'] == 0:
|
bar.time = str(row['time']).rjust(6, '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
|
||||||
|
Loading…
Reference in New Issue
Block a user