From 911e9bf317ad69edcb45db3970cc1da595ce6e8f Mon Sep 17 00:00:00 2001 From: msincenselee Date: Mon, 14 May 2018 08:46:59 +0800 Subject: [PATCH] bug fix --- vnpy/trader/gateway/ctpGateway/ctpGateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnpy/trader/gateway/ctpGateway/ctpGateway.py b/vnpy/trader/gateway/ctpGateway/ctpGateway.py index 49f6f518..c7cd21bf 100644 --- a/vnpy/trader/gateway/ctpGateway/ctpGateway.py +++ b/vnpy/trader/gateway/ctpGateway/ctpGateway.py @@ -413,7 +413,7 @@ class CtpMdApi(MdApi): tick.tradingDay = data['TradingDay'] # 先根据交易日期,生成时间 - tick.datetime = datetime.strptime(tick.date + ' ' + tick.time, '%Y-%m-%d %H:%M:%S') + tick.datetime = datetime.strptime(tick.date + ' ' + tick.time, '%Y%m%d %H:%M:%S.%f') # 修正时间 if tick.datetime.hour >= 20: if tick.datetime.isoweekday() == 1: