# HG changeset patch
# User Goffi <goffi@goffi.org>
# Date 1686252432 -7200
# Node ID 4325a0f13b0f105e522a5dc41eef2ec518cfbefc
# Parent  f8284f994948feb951f389bb2668a7e7e38f3744
tools (common/date_utils): update date parsing regex:

the regex `<timestamp> + 30 minutes` was not parsed correctly, this update should fix it.

diff -r f8284f994948 -r 4325a0f13b0f libervia/backend/tools/common/date_utils.py
--- a/libervia/backend/tools/common/date_utils.py	Thu Jun 08 21:26:09 2023 +0200
+++ b/libervia/backend/tools/common/date_utils.py	Thu Jun 08 21:27:12 2023 +0200
@@ -37,7 +37,7 @@
 
 RELATIVE_RE = re.compile(
     r"\s*(?P<in>\bin\b)?"
-    r"(?P<date>[^+-].+[^\s+-])?\s*(?P<direction>[-+])?\s*"
+    r"(?P<date>[^+-][^+]+[^\s+-])?\s*(?P<direction>[-+])?\s*"
     r"\s*(?P<quantity>\d+)\s*"
     r"(?P<unit>(second|sec|s|minute|min|month|mo|m|hour|hr|h|day|d|week|w|year|yr|y))s?"
     r"(?P<ago>\s+ago)?\s*",