mirror of
https://github.com/btclock/btclock_v3.git
synced 2024-11-19 02:20:02 +01:00
Fix timezone offset saving
This commit is contained in:
parent
25d8b92bcb
commit
5f971cfee3
@ -313,7 +313,7 @@ void onApiSettingsPatch(AsyncWebServerRequest *request, JsonVariant &json)
|
||||
}
|
||||
}
|
||||
|
||||
String uintSettings[] = {"minSecPriceUpd", "fullRefreshMin", "gmtOffset", "ledBrightness", "mcapBigChar"};
|
||||
String uintSettings[] = {"minSecPriceUpd", "fullRefreshMin", "ledBrightness", "mcapBigChar"};
|
||||
|
||||
for (String setting : uintSettings)
|
||||
{
|
||||
@ -324,6 +324,14 @@ void onApiSettingsPatch(AsyncWebServerRequest *request, JsonVariant &json)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (settings.containsKey("tzOffset"))
|
||||
{
|
||||
int gmtOffset = settings["tzOffset"].as<int>() * 60;
|
||||
size_t written = preferences.putInt("gmtOffset", gmtOffset);
|
||||
Serial.printf("Setting %s to %d (%d minutes, written %d)\r\n", "gmtOffset", gmtOffset, settings["tzOffset"].as<int>(), written);
|
||||
}
|
||||
|
||||
String boolSettings[] = {"fetchEurPrice", "ledTestOnPower", "ledFlashOnUpd", "mdnsEnabled", "otaEnabled", "stealFocus", "mcapBigChar"};
|
||||
|
||||
for (String setting : boolSettings)
|
||||
|
Loading…
Reference in New Issue
Block a user