aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/LocalizedUtils.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-12 06:02:37 +0000
committersaturneric <[email protected]>2024-01-12 06:02:37 +0000
commitbf538056b24a68b8fd235b1c50991ee8eb46a776 (patch)
treee1bab54095b80df62b321fb5bd69453f9f951b05 /src/core/utils/LocalizedUtils.cpp
parentfeat: improve api and ui of keys import and export (diff)
downloadGpgFrontend-bf538056b24a68b8fd235b1c50991ee8eb46a776.tar.gz
GpgFrontend-bf538056b24a68b8fd235b1c50991ee8eb46a776.zip
refactor: use QString instead of std::string and improve threading system
Diffstat (limited to 'src/core/utils/LocalizedUtils.cpp')
-rw-r--r--src/core/utils/LocalizedUtils.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/utils/LocalizedUtils.cpp b/src/core/utils/LocalizedUtils.cpp
index e1c3d859..b8c91039 100644
--- a/src/core/utils/LocalizedUtils.cpp
+++ b/src/core/utils/LocalizedUtils.cpp
@@ -32,9 +32,7 @@
namespace GpgFrontend {
-auto GetFormatedDateByTimestamp(time_t timestamp) -> std::string {
- QDateTime date;
- date.setSecsSinceEpoch(timestamp);
- return QLocale::system().toString(date).toStdString();
+auto GetFormatedDateByTimestamp(time_t timestamp) -> QString {
+ return QLocale::system().toString(QDateTime::fromSecsSinceEpoch(timestamp));
}
} // namespace GpgFrontend