Merge pull request #4676 from blockscout/np-fix-timestamp

Fix timestamp for blocks pages
pull/4681/head
Victor Baranov 3 years ago committed by GitHub
commit ce0293123a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 2
      apps/block_scout_web/assets/js/lib/from_now.js

@ -5,7 +5,7 @@
- [#4641](https://github.com/blockscout/blockscout/pull/4641) - Improve Read Contract page logic - [#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 - [#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 - [#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 - [#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 - [#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 - [#4624](https://github.com/blockscout/blockscout/pull/4624) - Support HTML tags in alert message

@ -22,7 +22,7 @@ function updateAge (el, timestamp) {
let fromNow = timestamp.fromNow() let fromNow = timestamp.fromNow()
// show the exact time only for transaction details page. Otherwise, short entry // show the exact time only for transaction details page. Otherwise, short entry
const elInTile = el.hasAttribute('in-tile') 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 offset = moment().utcOffset() / 60
const sign = offset && Math.sign(offset) ? '+' : '-' const sign = offset && Math.sign(offset) ? '+' : '-'
const formatDate = `MMMM-DD-YYYY hh:mm:ss A ${sign}${offset} UTC` const formatDate = `MMMM-DD-YYYY hh:mm:ss A ${sign}${offset} UTC`

Loading…
Cancel
Save