From 38c94098f416d48b9006d7e7f8556c8543a19513 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Tue, 11 Apr 2023 03:16:38 +0200 Subject: Corrected cdate and mdate formats for windows --- util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util.py') diff --git a/util.py b/util.py index 5e0ccce..243d78e 100644 --- a/util.py +++ b/util.py @@ -34,10 +34,10 @@ def rename_sha256(fpath): return rename_hash(fpath, hashlib.sha256()) def rename_cdate(fpath): - return rename(fpath, datetime.datetime.fromtimestamp(os.path.getctime(fpath)).strftime("%Y-%m-%d_%H:%M:%S:%f")) + return rename(fpath, datetime.datetime.fromtimestamp(os.path.getctime(fpath)).strftime("%Y-%m-%d-%H-%M-%S-%f")) def rename_mdate(fpath): - return rename(fpath, datetime.datetime.fromtimestamp(os.path.getmtime(fpath)).strftime("%Y-%m-%d_%H:%M:%S:%f")) + return rename(fpath, datetime.datetime.fromtimestamp(os.path.getmtime(fpath)).strftime("%Y-%m-%d-%H-%M-%S-%f")) def image_resize(image, width = None, height = None, inter = cv2.INTER_AREA): # initialize the dimensions of the image to be resized and -- cgit v1.2.1