From f5531599a6cd3d5887869fb27db596cc18058ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Matheson=20Wergeland?= Date: Sun, 15 Sep 2024 22:31:43 +0200 Subject: [PATCH] Support timestamps without leading 0 --- connectlife/appliance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectlife/appliance.py b/connectlife/appliance.py index 629541b..a1e8272 100644 --- a/connectlife/appliance.py +++ b/connectlife/appliance.py @@ -37,7 +37,7 @@ class DeviceType(StrEnum): } -RE_DATETIME = re.compile(r"^(\d{4,5})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})$") +RE_DATETIME = re.compile(r"^(\d{4,5})/(\d{1,2})/(\d{1,2})T(\d{1,2}):(\d{1,2}):(\d{1,2})$") MAX_DATETIME = dt.datetime(dt.MAXYEAR, 12, 31, 23, 59, 59, tzinfo=dt.UTC)