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:
co-authored by
Claude
Vlad Stan
parent
6c32ebf7e6
commit
e5e481f836
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user