diff options
author | Kali Kaneko <kali@leap.se> | 2017-09-20 21:15:08 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-09-20 21:24:37 +0200 |
commit | e4587411f03d768e3b74b9466f89355754d72597 (patch) | |
tree | 45428be05d290755f02589129b0f2835e759791c /src/leap/common/files.py | |
parent | 985cb1210b13ec204ef078296f853d7692658eee (diff) |
[bug] add proper formatting for mtime
Diffstat (limited to 'src/leap/common/files.py')
-rw-r--r-- | src/leap/common/files.py | 5 |
1 files 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 |