mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-15 15:35:14 +02:00
fix webserial is now in local timezone
This commit is contained in:
parent
72219cdf17
commit
a77bea55d0
6 changed files with 27 additions and 11 deletions
|
@ -18,6 +18,8 @@ webApi::webApi(AsyncWebServer *srv, app *app, sysConfig_t *sysCfg, config_t *con
|
|||
mConfig = config;
|
||||
mStat = stat;
|
||||
mVersion = version;
|
||||
|
||||
mTimezoneOffset = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -430,6 +432,8 @@ bool webApi::setSetup(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
|
|||
mApp->setTimestamp(jsonIn[F("ts")]);
|
||||
else if(F("sync_ntp") == jsonIn[F("cmd")])
|
||||
mApp->setTimestamp(0); // 0: update ntp flag
|
||||
else if(F("serial_utc_offset") == jsonIn[F("cmd")])
|
||||
mTimezoneOffset = jsonIn[F("ts")];
|
||||
else if(F("discovery_cfg") == jsonIn[F("cmd")])
|
||||
mApp->mFlagSendDiscoveryConfig = true; // for homeassistant
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue