aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-06-08 23:27:19 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-06-14 17:50:32 +0300
commit6afd16cfb93ca1cf943b7f304bf4b1ab781179b6 (patch)
tree87bc9e3f52969d40f8a2112ed7b2475711d521b5
parent7e60138c3231203a7f61130982560b7db6ec892c (diff)
Change timestamp display format on builds page
-rw-r--r--mod/mod-builds.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/mod-builds.cxx b/mod/mod-builds.cxx
index 757ddca..8bd6f88 100644
--- a/mod/mod-builds.cxx
+++ b/mod/mod-builds.cxx
@@ -352,6 +352,8 @@ handle (request& rq, response& rs)
else
s << DIV_COUNTER (count, "Build", "Builds");
+ timestamp now (timestamp::clock::now ());
+
// Enclose the subsequent tables to be able to use nth-child CSS selector.
//
s << DIV;
@@ -364,9 +366,10 @@ handle (request& rq, response& rs)
assert (b.machine);
string ts (butl::to_string (b.timestamp,
- "%Y-%m-%d %H:%M:%S%[.N] %Z",
+ "%Y-%m-%d %H:%M:%S %Z",
true,
- true));
+ true) +
+ " (" + butl::to_string (now - b.timestamp, false) + " ago)");
s << TABLE(CLASS="proplist build")
<< TBODY