NTPClient icon indicating copy to clipboard operation
NTPClient copied to clipboard

getEpochTime with timeOffset?

Open petslane opened this issue 7 years ago • 1 comments

Unix time (also known as POSIX time or epoch time) is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970 - Wikipedia

So, I understand that timeOffset is used to set timezone to get correct "local" time. But method getEpochTime() should return as it's name says - a Unix time in UTC regardless of "local" timezone. So looks like this->_timeOffset should not be added to this->_currentEpoc in NTPClient::getEpochTime()

petslane avatar Jun 06 '17 13:06 petslane

Agreed, please merge this pull request.

trapper- avatar Mar 12 '19 07:03 trapper-