From 9b268b258d27eda66d57a92008a7d289eb94b302 Mon Sep 17 00:00:00 2001 From: Yun Zheng Hu Date: Mon, 16 Oct 2023 12:19:35 +0200 Subject: [PATCH] Update flow/record/fieldtypes/__init__.py Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com> --- flow/record/fieldtypes/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flow/record/fieldtypes/__init__.py b/flow/record/fieldtypes/__init__.py index b076e14..8f0029c 100644 --- a/flow/record/fieldtypes/__init__.py +++ b/flow/record/fieldtypes/__init__.py @@ -297,7 +297,8 @@ def __new__(cls, *args, **kwargs): # YYYY-mm-dd length: 10 tstr = arg tzstr = "" - if tzpos := arg[10:].find("+") + 1 or arg[10:].find("-") + 1: + tzsearch = arg[10:] + if tzpos := tzsearch.find("+") + 1 or tzsearch.find("-") + 1: tzstr = arg[10 + tzpos - 1 :] tstr = arg[: 10 + tzpos - 1]