diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2015-10-19 22:47:18 +0100 |
---|---|---|
committer | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2015-10-19 22:47:33 +0100 |
commit | 7e3825a0dd2f993790073ebe528bec6aead3b1a6 (patch) | |
tree | 8d601cdc431947a0c42d481052d012c5a79f79fc /kbas | |
parent | d1feb3c177c2ec6fb7ff6286c04e9b6eda72e979 (diff) | |
download | ybd-7e3825a0dd2f993790073ebe528bec6aead3b1a6.tar.gz |
kbas just show date in artifacts list
Diffstat (limited to 'kbas')
-rwxr-xr-x | kbas/__main__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kbas/__main__.py b/kbas/__main__.py index e09a2ae..13d9ab3 100755 --- a/kbas/__main__.py +++ b/kbas/__main__.py @@ -19,7 +19,7 @@ import logging import os import glob import shutil -import time, datetime +from time import strftime, gmtime import tempfile import yaml from bottle import Bottle, request, response, template, static_file @@ -60,7 +60,7 @@ class KeyedBinaryArtifactServer(object): current_dir = os.getcwd() os.chdir(app.config['artifact-dir']) names = glob.glob('*' + name + '*') - content = [[x, datetime.datetime.fromtimestamp(os.path.getmtime(x))] + content = [[x, strftime('%y-%m-%d', gmtime(os.path.getmtime(x)))] for x in names] os.chdir(current_dir) return template('kbas', rows=sorted(content), css='/static/style.css') |