diff options
-rw-r--r-- | share/python/lib/files.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/python/lib/files.py b/share/python/lib/files.py index 3ea5877..8bc512a 100644 --- a/share/python/lib/files.py +++ b/share/python/lib/files.py @@ -1,4 +1,4 @@ -from time import strptime +from datetime import datetime import logging import os @@ -117,8 +117,8 @@ def files_match(ctx, filename1=None, filename2=None): def files_touch_with_timestamp(ctx, filename=None, mtime=None): - t = strptime(mtime, "%Y-%m-%d %H:%M:%S") - ts = time.mktime(t) + t = datetime.strptime(mtime + " +0000", "%Y-%m-%d %H:%M:%S %z") + ts = t.timestamp() _files_touch(filename, ts) |