[Fix] use local time for tick data, close #2106

This commit is contained in:
vn.py 2019-11-07 16:00:05 +08:00
parent 4e966a4bdb
commit 11d94b9902

View File

@ -93,7 +93,7 @@ class OesMdMessageLoop:
gateway_name=self.gateway.gateway_name,
symbol=symbol,
exchange=self.symbol_to_exchange[symbol],
datetime=datetime.utcnow()
datetime=datetime.now()
)
self.last_tick[symbol] = tick
return tick
@ -173,7 +173,7 @@ class OesMdMessageLoop:
data = d.trade
symbol = data.SecurityID
tick = self._get_last_tick(symbol)
tick.datetime = datetime.utcnow()
tick.datetime = datetime.now()
tick.volume = data.TradeQty
tick.last_price = data.TradePrice / 10000
self.gateway.on_tick(copy(tick))