From a48ac50951a46a4601d4066a5855ee89e4ad5c82 Mon Sep 17 00:00:00 2001 From: cjiang Date: Mon, 26 Feb 2018 09:26:50 +0800 Subject: [PATCH] [BUG] fix time convert bug (affecting xtp usage), thanks to HuangAiMin --- longfist/longfist/transfer_m.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/longfist/longfist/transfer_m.h b/longfist/longfist/transfer_m.h index e344cf5c1..8c6fcefb5 100644 --- a/longfist/longfist/transfer_m.h +++ b/longfist/longfist/transfer_m.h @@ -52,8 +52,8 @@ inline void TradingDayFromLong(char* trading_day, long datetime) inline void UpdateTimeFromLong(char* update_time, long datetime) { int time_int = datetime % 1000000000; - datetime /= 1000; - sprintf(update_time, "%02d:%02d:%02d", datetime / 10000, datetime / 100 % 100, datetime % 100); + time_int /= 1000; + sprintf(update_time, "%02d:%02d:%02d", time_int / 10000, time_int / 100 % 100, time_int % 100); } /*