aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/LocalizedUtils.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-03-02 18:22:27 +0000
committersaturneric <[email protected]>2024-03-02 18:22:27 +0000
commit3a0b2bd05af92fff313dcc6fa34fb87ac8030746 (patch)
tree420cc23dc12ca947e39906981c8814e04b51e0c4 /src/core/utils/LocalizedUtils.cpp
parentfix: change GpgFrontend to Gpg Frontend on linux platform (diff)
parentfeat: add user agent header when doing http request (diff)
downloadGpgFrontend-3a0b2bd05af92fff313dcc6fa34fb87ac8030746.tar.gz
GpgFrontend-3a0b2bd05af92fff313dcc6fa34fb87ac8030746.zip
Merge branch 'dev/2.1.2/main' into develop
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