From 82c3d9d8a6f8ddb48f672701c628332704cc5fc5 Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Wed, 3 Jan 2024 13:24:01 +0100 Subject: [PATCH] replace utcnow() with now() --- cronwrapper/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cronwrapper/__init__.py b/cronwrapper/__init__.py index d213321..5d1e6af 100755 --- a/cronwrapper/__init__.py +++ b/cronwrapper/__init__.py @@ -108,7 +108,7 @@ def exec_command(args, outfile, errfile, resfile): proc.terminate() proc.communicate(timeout=10) - now=datetime.datetime.utcnow() + now=datetime.datetime.now() nowstr=now.strftime('%Y-%m-%d_%H%M.%S') resfile.write('{}\n{}'.format(nowstr, proc.returncode)) return proc.returncode @@ -171,7 +171,7 @@ def print_runs(runs, clean=True): def main(): time_format = '%Y-%m-%d_%H%M' args = parse_args() - now = datetime.datetime.utcnow() + now = datetime.datetime.now() nowstr = now.strftime(time_format) libdir = os.path.join(args.cachedir[0], args.name, nowstr) lckdir = os.path.join(args.lockdir[0], args.name)