From e4587411f03d768e3b74b9466f89355754d72597 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 20 Sep 2017 21:15:08 +0200 Subject: [bug] add proper formatting for mtime --- src/leap/common/files.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/leap/common/files.py b/src/leap/common/files.py index bba281b..84e9015 100644 --- a/src/leap/common/files.py +++ b/src/leap/common/files.py @@ -59,8 +59,9 @@ def get_mtime(filename): :rtype: str """ try: - mtime = time.ctime(os.path.getmtime(filename)) + " GMT" - return mtime + return time.strftime( + '%a, %d %b %Y %H:%M:%S GMT', time.gmtime( + os.path.getmtime(filename))) except OSError: return None -- cgit v1.2.3