diff --git a/views/includes/block-content.pug b/views/includes/block-content.pug index e4d2c01..3a0ae93 100644 --- a/views/includes/block-content.pug +++ b/views/includes/block-content.pug @@ -44,8 +44,11 @@ div(class="tab-content") a(href=("/block-height/" + result.getblock.height)) #{result.getblock.height.toLocaleString()} tr - th(class="table-active properties-header") Timestamp - td(class="monospace") #{moment.utc(new Date(result.getblock.time * 1000)).format("Y-MM-DD HH:mm:ss")} (utc) + th(class="table-active properties-header") Timestamp (utc) + + - var timeAgo = moment.duration(moment.utc(new Date()).diff(moment.utc(new Date(parseInt(result.getblock.time) * 1000)))); + td(class="monospace") #{moment.utc(new Date(result.getblock.time * 1000)).format("Y-MM-DD HH:mm:ss")} + span(class="text-muted") (#{timeAgo.format()}) tr th(class="table-active properties-header") Transaction Count diff --git a/views/transaction.pug b/views/transaction.pug index f2239ca..b4e0dae 100644 --- a/views/transaction.pug +++ b/views/transaction.pug @@ -59,9 +59,12 @@ block content span(class="text-muted") (unconfirmed) tr - th(class="table-active properties-header") Timestamp + th(class="table-active properties-header") Timestamp (utc) + if (result.getrawtransaction.time) - td(class="monospace") #{moment.utc(new Date(result.getrawtransaction["time"] * 1000)).format("Y-MM-DD HH:mm:ss")} (utc) + td(class="monospace") #{moment.utc(new Date(result.getrawtransaction["time"] * 1000)).format("Y-MM-DD HH:mm:ss")} + - var timeAgo = moment.duration(moment.utc(new Date()).diff(moment.utc(new Date(parseInt(result.getrawtransaction["time"]) * 1000)))); + span(class="text-muted") (#{timeAgo.format()}) else td(class="monospace") N/A span(class="text-muted") (unconfirmed)