Skip to content

Commit

Permalink
[BUG] fix time convert bug (affecting xtp usage), thanks to HuangAiMin
Browse files Browse the repository at this point in the history
  • Loading branch information
aslan9 committed Feb 26, 2018
1 parent 1bdd138 commit a48ac50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions longfist/longfist/transfer_m.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit a48ac50

Please sign in to comment.