From a84a338d73085de667bfcf57cbd6b61c5bfb2814 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Nov 26 2019 14:14:58 +0000 Subject: PR#1691: human-readable timestamp in koji-gc log Merges #1691 https://pagure.io/koji/pull-request/1691 Fixes: #1690 https://pagure.io/koji/issue/1690 koji-gc message about "last used" is just timestamp --- diff --git a/util/koji-gc b/util/koji-gc index d0bdf88..feec2fa 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 @@ -473,7 +474,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