Merge pull request #3332 from pappastech/master

Fix to logparser.py for timezones with a negative time offset.
This commit is contained in:
Antoine Nguyen
2024-11-28 20:38:59 +01:00
committed by GitHub
@@ -82,6 +82,7 @@ class LogParser:
self._date_expressions = [
r"(?P<month>\w+)\s+(?P<day>\d+)\s+(?P<hour>\d+):(?P<min>\d+):(?P<sec>\d+)(?P<eol>.*)", # noqa
r"(?P<year>\d+)-(?P<month>\d+)-(?P<day>\d+)T(?P<hour>\d+):(?P<min>\d+):(?P<sec>\d+)\.\d+\+\d+:\d+(?P<eol>.*)", # noqa
r"(?P<year>\d+)-(?P<month>\d+)-(?P<day>\d+)T(?P<hour>\d+):(?P<min>\d+):(?P<sec>\d+)\.\d+\-\d+:\d+(?P<eol>.*)", # noqa
]
self._date_expressions = [re.compile(v) for v in self._date_expressions]
self.date_expr = None