From e85961ed2baf08c5aef46d3f6c1822e5ef0b620c Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Oct 10 2019 08:55:23 +0000 Subject: human-readable timestamp in koji-gc log Fixes: https://pagure.io/koji/issue/1690 --- diff --git a/util/koji-gc b/util/koji-gc index 02a29f1..d2ebb4f 100755 --- a/util/koji-gc +++ b/util/koji-gc @@ -15,6 +15,7 @@ except ImportError: # pragma: no cover import koji from koji.util import LazyDict, LazyValue, to_list import koji.policy +import datetime import fnmatch import optparse import os @@ -481,7 +482,7 @@ def handle_trash(): #XXX - should really check time server side if options.debug: print("[%i/%i] Build has been used in a buildroot: %s" % (i, N, nvr)) - print("Last_used: %r" % ts) + print("Last_used: %s" % datetime.datetime.fromtimestamp(ts).isoformat()) age = time.time() - ts if age < min_age: continue