nebulasio / explorer

Block Explorer of Nebulas
https://explorer-flame.vercel.app
GNU Lesser General Public License v3.0
107 stars 86 forks source link

time ago calc bug #43

Closed act262 closed 6 years ago

act262 commented 6 years ago

timeConversion(Date.now() - tx.timestamp)计算时间这里是直接取本地时间对比的,但是不同电脑时间可能不一样就会导致计算结果异常。

貌似应该用接口返回数据中的currentTimestamp字段去对比时间差 即timeConversion(currentTimestamp - tx.timestamp)

原代码位置: tx.vue txs.vue

{{ timeConversion(Date.now() - tx.timestamp) }} ago ({{ new Date(tx.timestamp).toString() }} | {{ tx.timestamp }})
bufg
fzxa commented 6 years ago

感谢指正, 我们会在服务端增加时间判断解决

fzxa commented 6 years ago

@act262 已经解决了