Skip to content

Incorrect UtilAll::currentTimeMillis #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lemonzone2010 opened this issue Dec 25, 2018 · 1 comment
Closed

Incorrect UtilAll::currentTimeMillis #38

lemonzone2010 opened this issue Dec 25, 2018 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@lemonzone2010
Copy link
Contributor

I send one message,but i found incorrent bornTimestamp.
requestHeader->bornTimestamp

requestHeader->bornTimestamp = UtilAll::currentTimeMillis();

The following unix timestamp value is what i want. But i got incorrent currentTimeMillis by UtilAll::currentTimeMillis:

current time:2018/12/25 19:41:53
unix timestamp:1545738113705
result of UtilAll::currentTimeMillis:70913705

UtilAll::currentTimeMillis

uint64_t UtilAll::currentTimeMillis() {
  boost::posix_time::ptime current_date_microseconds =
      boost::posix_time::microsec_clock::local_time();
  return current_date_microseconds.time_of_day().total_milliseconds();
}
@lemonzone2010 lemonzone2010 changed the title incorrect UtilAll::currentTimeMillis Incorrect UtilAll::currentTimeMillis Dec 25, 2018
@ShannonDing ShannonDing added the bug Something isn't working label Dec 25, 2018
@ShannonDing ShannonDing added this to the 1.2.1 milestone Dec 25, 2018
ShannonDing added a commit that referenced this issue Dec 26, 2018
[ISSUE #38] Using std::chrono to get current time stamp
@ShannonDing
Copy link
Member

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants