This commit is contained in:
e2002
2025-07-11 14:25:42 +03:00
parent 2afe475ec2
commit 053d438da4
3 changed files with 9 additions and 6 deletions

View File

@@ -582,13 +582,13 @@ void NetServer::onWsMessage(void *arg, uint8_t *data, size_t len, uint8_t client
return;
}
if (strcmp(cmd, "sntp1") == 0) {
strlcpy(config.store.sntp1, val, 35);
//strlcpy(config.store.sntp1, val, 35);
bool tzdone = false;
if (strlen(config.store.sntp1) > 0 && strlen(config.store.sntp2) > 0) {
configTime(config.store.tzHour * 3600 + config.store.tzMin * 60, config.getTimezoneOffset(), config.store.sntp1, config.store.sntp2);
if (strlen(val) > 0 && strlen(config.store.sntp2) > 0) {
configTime(config.store.tzHour * 3600 + config.store.tzMin * 60, config.getTimezoneOffset(), val, config.store.sntp2);
tzdone = true;
} else if (strlen(config.store.sntp1) > 0) {
configTime(config.store.tzHour * 3600 + config.store.tzMin * 60, config.getTimezoneOffset(), config.store.sntp1);
} else if (strlen(val) > 0) {
configTime(config.store.tzHour * 3600 + config.store.tzMin * 60, config.getTimezoneOffset(), val);
tzdone = true;
}
if (tzdone) {

View File

@@ -1,7 +1,7 @@
#ifndef options_h
#define options_h
#define YOVERSION "0.9.511"
#define YOVERSION "0.9.512"
/*******************************************************
DO NOT EDIT THIS FILE.