mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 04:56:53 +03:00
Fix timezone config parser (#2169)
* make sure to parse the whole config line * fix crash on empty timezone parameter --------- Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
@@ -175,10 +175,15 @@ bool setupTime() {
|
||||
|
||||
while (configFile.getNextLine(&line, disabledLine, eof) &&
|
||||
!configFile.isNewParagraph(line)) {
|
||||
splitted = ZerlegeZeile(line);
|
||||
splitted = ZerlegeZeile(line, "=");
|
||||
|
||||
if (toUpper(splitted[0]) == "TIMEZONE") {
|
||||
timeZone = splitted[1];
|
||||
if (splitted.size() <= 1) { // parameter part is empty
|
||||
timeZone = "";
|
||||
}
|
||||
else {
|
||||
timeZone = splitted[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (toUpper(splitted[0]) == "TIMESERVER") {
|
||||
|
||||
Reference in New Issue
Block a user