Expand timezone range to -13/13

Fix timezone range from -12/12 to -13/13 (#968)
This commit is contained in:
arendst 2017-10-05 14:10:42 +02:00
parent 9e845f3c1e
commit 7817199b59
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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);