aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/LocalizedUtils.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-02-26 11:55:50 +0000
committersaturneric <[email protected]>2024-02-26 11:55:50 +0000
commit17b37d58534c1577be6fdfccc3ad6168d11cc5e4 (patch)
tree658a59a517fbcb464e8a6eb5ff04d9a4996d0b34 /src/core/utils/LocalizedUtils.cpp
parentfix: improve icons and logo style (diff)
downloadGpgFrontend-17b37d58534c1577be6fdfccc3ad6168d11cc5e4.tar.gz
GpgFrontend-17b37d58534c1577be6fdfccc3ad6168d11cc5e4.zip
fix: show the real UTC datetime
Diffstat (limited to 'src/core/utils/LocalizedUtils.cpp')
-rw-r--r--src/core/utils/LocalizedUtils.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/utils/LocalizedUtils.cpp b/src/core/utils/LocalizedUtils.cpp
index 6c020ed7..e5c9b434 100644
--- a/src/core/utils/LocalizedUtils.cpp
+++ b/src/core/utils/LocalizedUtils.cpp
@@ -32,7 +32,12 @@
namespace GpgFrontend {
-auto GetFormatedDateByTimestamp(time_t timestamp) -> QString {
+auto GetLocalizedDateByTimestamp(time_t timestamp) -> QString {
return QLocale().toString(QDateTime::fromSecsSinceEpoch(timestamp));
}
+
+auto GetUTCDateByTimestamp(time_t timestamp) -> QString {
+ return QLocale().toString(QDateTime::fromSecsSinceEpoch(timestamp).toUTC());
+}
+
} // namespace GpgFrontend