diff options
author | saturneric <[email protected]> | 2024-02-26 11:55:50 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-02-26 11:55:50 +0000 |
commit | 17b37d58534c1577be6fdfccc3ad6168d11cc5e4 (patch) | |
tree | 658a59a517fbcb464e8a6eb5ff04d9a4996d0b34 /src/core/utils/LocalizedUtils.cpp | |
parent | fix: improve icons and logo style (diff) | |
download | GpgFrontend-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.cpp | 7 |
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 |