replace utcnow() with now()

This commit is contained in:
Fredrik Eriksson 2024-01-03 13:24:01 +01:00
parent 74201e59d6
commit 82c3d9d8a6
Signed by: feffe
GPG Key ID: CD5A131FADFA3968

View File

@ -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)