Skip to content

fix get_cur_timestamp#159

Merged
HTHou merged 1 commit intoapache:developfrom
hongzhi-gao:fix/get_cur_timestamp
Jul 5, 2024
Merged

fix get_cur_timestamp#159
HTHou merged 1 commit intoapache:developfrom
hongzhi-gao:fix/get_cur_timestamp

Conversation

@hongzhi-gao
Copy link
Contributor

The issue arose because the tv_sec (long) used to represent the seconds timestamp is stored as a 32-bit value under MinGW. When we calculate the milliseconds timestamp using tv_sec * 1000, an overflow occurs. This overflow problem was detected during unit testing. Coincidentally, the calculation of the seconds timestamp a few days ago did not result in an overflow.

@HTHou HTHou merged commit 29703cf into apache:develop Jul 5, 2024
@hongzhi-gao hongzhi-gao deleted the fix/get_cur_timestamp branch July 6, 2024 06:58
HTHou pushed a commit that referenced this pull request Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CPP] UtilTest.GetCurTimestamp failed on Windows

2 participants