From 78aebb7d6c6e0d6178c045e4af0c3b553bbff4d6 Mon Sep 17 00:00:00 2001
From: MaysWind
Date: Sun, 10 Mar 2024 13:45:21 +0800
Subject: [PATCH] show the transaction time in default timezone on tooltip in
desktop version transaction list page when the transaction time zone is not
the default time zone
---
src/views/desktop/transactions/ListPage.vue | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/views/desktop/transactions/ListPage.vue b/src/views/desktop/transactions/ListPage.vue
index c8792a6f..95bf5590 100644
--- a/src/views/desktop/transactions/ListPage.vue
+++ b/src/views/desktop/transactions/ListPage.vue
@@ -262,6 +262,7 @@
{{ getDisplayTime(transaction) }}
{{ getDisplayTimezone(transaction) }}
+ {{ getDisplayTimeInDefaultTimezone(transaction) }}
@@ -352,6 +353,7 @@ import {
getUnixTime,
getSpecifiedDayFirstUnixTime,
getUtcOffsetByUtcOffsetMinutes,
+ getTimezoneOffset,
getTimezoneOffsetMinutes,
getBrowserTimezoneOffsetMinutes,
getActualUnixTimeForStore,
@@ -891,6 +893,9 @@ export default {
getDisplayTime(transaction) {
return this.$locale.formatUnixTimeToShortTime(this.userStore, transaction.time, transaction.utcOffset, this.currentTimezoneOffsetMinutes);
},
+ getDisplayTimeInDefaultTimezone(transaction) {
+ return `${this.$locale.formatUnixTimeToLongDateTime(this.userStore, transaction.time)} (UTC${getTimezoneOffset(this.settingsStore.appSettings.timeZone)})`;
+ },
getDisplayTimezone(transaction) {
return `UTC${getUtcOffsetByUtcOffsetMinutes(transaction.utcOffset)}`;
},
|