fix to convert string to time for cet timezone as well

This commit is contained in:
maliakal_d 2022-01-28 15:26:12 +01:00
parent f6e76145c1
commit 3c0b57eaa1

View File

@ -76,6 +76,11 @@ int getTimeFromString(char *buf, time_t *result) {
LOG(logDEBUG, ("kernel v %s\n", buffer));
const char *timezone = {"CEST"};
char *res = strstr(buffer, timezone);
// remove CET as well
if (res == NULL) {
strcpy(timezone, "CET");
res = strstr(buffer, timezone);
}
if (res != NULL) {
size_t cestPos = res - buffer;
size_t pos = cestPos + strlen(timezone) + 1;