From 7817199b59498e94cae3e6ff6529e105f0dbc7e2 Mon Sep 17 00:00:00 2001 From: arendst Date: Thu, 5 Oct 2017 14:10:42 +0200 Subject: [PATCH] Expand timezone range to -13/13 Fix timezone range from -12/12 to -13/13 (#968) --- sonoff/_releasenotes.ino | 1 + sonoff/sonoff.ino | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 7a56db95c..aa5aea832 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,6 +1,7 @@ /* 5.8.0g * Fix inverted PWM index (#960) * Fix some PWM related issues (#967) + * Fix timezone range from -12/12 to -13/13 (#968) * * 5.8.0f * Set all saved power settings to Off when SetOption0 (SaveState) = 0 (#955) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 67dc82aa4..77cf926c5 100644 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -1505,7 +1505,7 @@ void mqttDataCb(char* topic, byte* data, unsigned int data_len) } } else if (!strcasecmp_P(type, PSTR(D_CMND_TIMEZONE))) { - if ((data_len > 0) && (((payload >= -12) && (payload <= 12)) || (99 == payload))) { + if ((data_len > 0) && (((payload >= -13) && (payload <= 13)) || (99 == payload))) { sysCfg.timezone = payload; } snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_TIMEZONE "\":%d}"), sysCfg.timezone);