mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
fix to convert string to time for cet timezone as well
This commit is contained in:
parent
f6e76145c1
commit
3c0b57eaa1
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user