Merge pull request #466 from GreyRook/add-timezone

Issue #464 Fix
This commit is contained in:
Verkehrsrot 2019-10-10 22:39:47 +02:00 committed by GitHub
commit f1eca6f1a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,7 +209,7 @@ int recv_timesync_ans(const uint8_t buf[], const uint8_t buf_len) {
// construct the timepoint when message was seen on gateway // construct the timepoint when message was seen on gateway
time_sync_rx[k] += time_sync_rx[k] +=
seconds(timestamp_sec + timezone_sec) + milliseconds(timestamp_msec); seconds(timestamp_sec) + milliseconds(timestamp_msec);
// we guess timepoint is recent if it newer than code compile date // we guess timepoint is recent if it newer than code compile date
if (timeIsValid(myClock::to_time_t(time_sync_rx[k]))) { if (timeIsValid(myClock::to_time_t(time_sync_rx[k]))) {