mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-11 21:47:16 +02:00
fixed timezone for time sync from browser #336 (thx @DanielR92)
This commit is contained in:
parent
6bf6e357ca
commit
dbdc2ad5ab
4 changed files with 8 additions and 9 deletions
|
@ -392,12 +392,10 @@ bool webApi::setCtrl(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool webApi::setSetup(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
|
||||
if(F("set_time") == jsonIn[F("cmd")]) {
|
||||
if(F("set_time") == jsonIn[F("cmd")])
|
||||
mApp->setTimestamp(jsonIn[F("ts")]);
|
||||
}
|
||||
else if(F("sync_ntp") == jsonIn[F("cmd")]) {
|
||||
else if(F("sync_ntp") == jsonIn[F("cmd")])
|
||||
mApp->setTimestamp(0); // 0: update ntp flag
|
||||
}
|
||||
else {
|
||||
jsonOut[F("error")] = F("unknown cmd");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue