Skip to content

tracker.py: fix the parsing of reports datetime strings

Ricardo Cañuelo requested to merge rcn/fix-date-parsing into main

They have a format that's not quite ISO 8601 as understood by python's datetime lib. For now we'll drop the microseconds from it to make it parseable. Use a regex to do that instead of slicing a fixed number of characters from the string.

Current parsing failed on strings like this:

2023-02-21T07:39:56.800487336-08:00
2023-02-21T05:13:42.85820633-08:00     <--- parsing error
2023-02-21T04:54:47.471878024-08:00

Signed-off-by: Ricardo Cañuelo ricardo.canuelo@collabora.com

Edited by Ricardo Cañuelo

Merge request reports