EasyNTPClient icon indicating copy to clipboard operation
EasyNTPClient copied to clipboard

Update setTimeOffset

Open 0rinsb3lt opened this issue 6 years ago • 0 comments

I suggest adding a line to setTimeOffset() so that it changes mServerTime by the offset once the function is called.

Steps:

  1. getUnixTime()
  2. setTimeOffset(offset)
  3. getUnixTime()

Expected Behavior:

  • Return unix time + offset

Actual Behavior:

  • Return unix time

Changing: void EasyNTPClient::setTimeOffset (int offset) { this->mOffset = offset; } to: void EasyNTPClient::setTimeOffset (int offset) { this->mOffset = offset; this->mServerTime = this->mServerTime + this->mOffset; }

0rinsb3lt avatar Oct 25 '18 19:10 0rinsb3lt