From 11d94b99025f1f22522108209562e53c3f5fdafe Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Thu, 7 Nov 2019 16:00:05 +0800 Subject: [PATCH] [Fix] use local time for tick data, close #2106 --- vnpy/gateway/oes/oes_md.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/gateway/oes/oes_md.py b/vnpy/gateway/oes/oes_md.py index e63213fb..26194e21 100644 --- a/vnpy/gateway/oes/oes_md.py +++ b/vnpy/gateway/oes/oes_md.py @@ -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))