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)