summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-14 18:33:12 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-14 18:33:12 +0300
commite054e2e3720c2d1d2bd817a6d7a9701935f44d9e (patch)
treed30f3903d259cc63373d4fbcb707d75d4eef9667 /src/utils/stringutils.cpp
parentce3ecf15a3ba126e665500270ef7fc8584d0b9b2 (diff)
downloadplus-e054e2e3720c2d1d2bd817a6d7a9701935f44d9e.tar.gz
plus-e054e2e3720c2d1d2bd817a6d7a9701935f44d9e.tar.bz2
plus-e054e2e3720c2d1d2bd817a6d7a9701935f44d9e.tar.xz
plus-e054e2e3720c2d1d2bd817a6d7a9701935f44d9e.zip
Try fix time_t cast again.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 16f45932d..3cde2f208 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -927,8 +927,7 @@ std::string removeToken(std::string &str, const std::string &token)
std::string timeToStr(const uint32_t time)
{
char buf[101];
- time_t tempTime = reinterpret_cast<time_t>(
- static_cast<long int>(time));
+ const time_t tempTime = time;
tm *const timeInfo = localtime(&tempTime);
if (strftime(&buf[0], 100, "%Y-%m-%d_%H-%M-%S", timeInfo))
return std::string(buf);