Browse Source

ntp: use the actual legacy default values

pull/2375/head
Maxim Prokhorov 3 years ago
parent
commit
fd9f930e71
2 changed files with 3 additions and 25 deletions
  1. +0
    -22
      code/espurna/config/general.h
  2. +3
    -3
      code/espurna/ntp.cpp

+ 0
- 22
code/espurna/config/general.h View File

@ -1596,28 +1596,6 @@
#define NTP_WAIT_FOR_SYNC 1 // Do not report any datetime until NTP sync'ed
#endif
// WARNING: legacy NTP settings. can be ignored with Core 2.6.2+
#ifndef NTP_TIMEOUT
#define NTP_TIMEOUT 1000 // Set NTP request timeout to 2 seconds (issue #452)
#endif
#ifndef NTP_TIME_OFFSET
#define NTP_TIME_OFFSET 60 // Default timezone offset (GMT+1)
#endif
#ifndef NTP_DAY_LIGHT
#define NTP_DAY_LIGHT 1 // Enable daylight time saving by default
#endif
#ifndef NTP_SYNC_INTERVAL
#define NTP_SYNC_INTERVAL 60 // NTP initial check every minute
#endif
#ifndef NTP_DST_REGION
#define NTP_DST_REGION 0 // 0 for Europe, 1 for USA (defined in NtpClientLib)
#endif
// -----------------------------------------------------------------------------
// ALEXA
// -----------------------------------------------------------------------------


+ 3
- 3
code/espurna/ntp.cpp View File

@ -351,8 +351,8 @@ void _ntpConvertLegacyOffsets() {
bool found { false };
bool europe { true };
bool dst { false };
int offset { 0 };
bool dst { true };
int offset { 60 };
settings::kv_store.foreach([&](settings::kvs_type::KeyValueResult&& kv) {
const auto key = kv.key.read();
@ -374,7 +374,7 @@ void _ntpConvertLegacyOffsets() {
// XXX: only expect offsets in hours
String custom { europe ? F("CET") : F("CST") };
custom.reserve(16);
custom.reserve(32);
if (offset > 0) {
custom += '-';


Loading…
Cancel
Save