From d7baa8853259e5b4ac6a7bf4f3b6a66b2a70144a Mon Sep 17 00:00:00 2001 From: nikitosing Date: Wed, 22 Sep 2021 21:02:17 +0300 Subject: [PATCH] Fix timestamp for blocks pages --- CHANGELOG.md | 2 +- apps/block_scout_web/assets/js/lib/from_now.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a56b87453..d5850135cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - [#4641](https://github.com/blockscout/blockscout/pull/4641) - Improve Read Contract page logic - [#4660](https://github.com/blockscout/blockscout/pull/4660) - Save Sourcify path instead of filename - [#4656](https://github.com/blockscout/blockscout/pull/4656) - Open in Tenderly button -- [#4655](https://github.com/blockscout/blockscout/pull/4655) - EIP-3091 support +- [#4655](https://github.com/blockscout/blockscout/pull/4655), [#4676](https://github.com/blockscout/blockscout/pull/4676) - EIP-3091 support - [#4621](https://github.com/blockscout/blockscout/pull/4621) - Add beacon contract address slot for proxy - [#4625](https://github.com/blockscout/blockscout/pull/4625) - Contract address page: Add implementation link to the overview of proxy contracts - [#4624](https://github.com/blockscout/blockscout/pull/4624) - Support HTML tags in alert message diff --git a/apps/block_scout_web/assets/js/lib/from_now.js b/apps/block_scout_web/assets/js/lib/from_now.js index 1c95f35075..32dc90b0fc 100644 --- a/apps/block_scout_web/assets/js/lib/from_now.js +++ b/apps/block_scout_web/assets/js/lib/from_now.js @@ -22,7 +22,7 @@ function updateAge (el, timestamp) { let fromNow = timestamp.fromNow() // show the exact time only for transaction details page. Otherwise, short entry const elInTile = el.hasAttribute('in-tile') - if ((window.location.pathname.includes('/tx/') || window.location.pathname.includes('/blocks/')) && !elInTile) { + if ((window.location.pathname.includes('/tx/') || window.location.pathname.includes('/block/') || window.location.pathname.includes('/blocks/')) && !elInTile) { const offset = moment().utcOffset() / 60 const sign = offset && Math.sign(offset) ? '+' : '-' const formatDate = `MMMM-DD-YYYY hh:mm:ss A ${sign}${offset} UTC`