diff --git a/src/flb_parser.c b/src/flb_parser.c index faf5c4a89dd..d0bb5cf7ef7 100644 --- a/src/flb_parser.c +++ b/src/flb_parser.c @@ -40,6 +40,7 @@ #include #include #include +#include static inline uint32_t digits10(uint64_t v) { if (v < 10) return 1; @@ -934,6 +935,8 @@ int flb_parser_tzone_offset(const char *str, int len, int *tmdiff) long min; const char *end; const char *p = str; + time_t t = time(NULL); + struct tm lt = {0}; /* Check timezones */ if (*p == 'Z') { @@ -942,6 +945,15 @@ int flb_parser_tzone_offset(const char *str, int len, int *tmdiff) return 0; } + /* Check timezones */ + if (*p == 'System') { + /* This is UTC, no changes required */ + + localtime_r(&t, <); + *tmdiff = lt.tm_gmtoff; + return 0; + } + /* Unexpected timezone string */ if (*p != '+' && *p != '-') { *tmdiff = 0;