[Fix] use local time for tick data, close #2106
This commit is contained in:
parent
4e966a4bdb
commit
11d94b9902
@ -93,7 +93,7 @@ class OesMdMessageLoop:
|
|||||||
gateway_name=self.gateway.gateway_name,
|
gateway_name=self.gateway.gateway_name,
|
||||||
symbol=symbol,
|
symbol=symbol,
|
||||||
exchange=self.symbol_to_exchange[symbol],
|
exchange=self.symbol_to_exchange[symbol],
|
||||||
datetime=datetime.utcnow()
|
datetime=datetime.now()
|
||||||
)
|
)
|
||||||
self.last_tick[symbol] = tick
|
self.last_tick[symbol] = tick
|
||||||
return tick
|
return tick
|
||||||
@ -173,7 +173,7 @@ class OesMdMessageLoop:
|
|||||||
data = d.trade
|
data = d.trade
|
||||||
symbol = data.SecurityID
|
symbol = data.SecurityID
|
||||||
tick = self._get_last_tick(symbol)
|
tick = self._get_last_tick(symbol)
|
||||||
tick.datetime = datetime.utcnow()
|
tick.datetime = datetime.now()
|
||||||
tick.volume = data.TradeQty
|
tick.volume = data.TradeQty
|
||||||
tick.last_price = data.TradePrice / 10000
|
tick.last_price = data.TradePrice / 10000
|
||||||
self.gateway.on_tick(copy(tick))
|
self.gateway.on_tick(copy(tick))
|
||||||
|
Loading…
Reference in New Issue
Block a user