Skip to content

Update setTimeOffset  #2

@0rinsb3lt

Description

@0rinsb3lt

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; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions