fix: correct timezone handling for transaction timestamps (#3373)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
Ben Weeks
2025-10-06 10:53:03 +02:00
committed by GitHub
co-authored by Claude Vlad Stan
parent 6c32ebf7e6
commit e5e481f836
6 changed files with 18 additions and 9 deletions
+9 -3
View File
@@ -179,7 +179,7 @@ window.WalletPageLogic = {
methods: {
dateFromNow(unix) {
const date = new Date(unix * 1000)
return moment.utc(date).fromNow()
return moment.utc(date).local().fromNow()
},
formatFiatAmount(amount, currency) {
this.update.currency = currency
@@ -476,8 +476,14 @@ window.WalletPageLogic = {
createdDate,
'YYYY-MM-DDTHH:mm:ss.SSSZ'
)
cleanInvoice.expireDateFrom = moment.utc(expireDate).fromNow()
cleanInvoice.createdDateFrom = moment.utc(createdDate).fromNow()
cleanInvoice.expireDateFrom = moment
.utc(expireDate)
.local()
.fromNow()
cleanInvoice.createdDateFrom = moment
.utc(createdDate)
.local()
.fromNow()
cleanInvoice.expired = false // TODO
}