Fix to logparser.py for timezones with a negative time offset.

This commit is contained in:
pappastech
2024-11-28 17:15:14 +01:00
committed by Antoine Nguyen
parent 899c5ee276
commit 61b2843f38
@@ -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