From 1ff8fe39cd17f44e8e5826cd695c74692d48c630 Mon Sep 17 00:00:00 2001 From: endorphant Date: Sun, 15 May 2016 18:22:18 -0400 Subject: [PATCH] feed publishing tweak changing feed publishing to report absolute instead of relative timestamp --- bin/_ttbp.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/_ttbp.py b/bin/_ttbp.py index 8518ec5..c1406c8 100644 --- a/bin/_ttbp.py +++ b/bin/_ttbp.py @@ -567,15 +567,14 @@ def www_neighbors(users): if core.valid(filename): lastfile = os.path.join("/home", user, ".ttbp", "entries", filename) - ago = "never" if lastfile: last = os.path.getctime(lastfile) - since = time.time()-last - ago = util.pretty_time(int(since)) + " ago" + timestamp = time.strftime("%Y-%m-%d at %H:%M", time.localtime(last)) else: + timestamp = "" last = 0 - userList.append(["~"+user+" ("+ago+")", last]) + userList.append(["~"+user+" "+timestamp, last]) # sort user by most recent entry userList.sort(key = lambda userdata:userdata[1])