From 51fbda4223442635a35d3225c0797d0151ea7051 Mon Sep 17 00:00:00 2001 From: Treeston Date: Sun, 4 Aug 2019 12:22:57 +0200 Subject: Core/Pooling: Quest pooling rewrite: (PR#23627) - Split quest pooling from PoolMgr (into QuestPoolMgr) - Proper saving/restoring on server restart - No more hacking into sObjectMgr to insert/remove available quests (cherry picked from commit a5e73e41c0e813e674bb0a644e0052052435494e) --- src/common/Utilities/Util.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/common/Utilities/Util.cpp') diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp index fab84bb5fbd..bbcc4153f97 100644 --- a/src/common/Utilities/Util.cpp +++ b/src/common/Utilities/Util.cpp @@ -207,6 +207,15 @@ std::string TimeToTimestampStr(time_t t) return Trinity::StringFormat("%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year + 1900, aTm.tm_mon + 1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec); } +std::string TimeToHumanReadable(time_t t) +{ + tm time; + localtime_r(&t, &time); + char buf[30]; + strftime(buf, 30, "%c", &time); + return std::string(buf); +} + /// Check if the string is a valid ip address representation bool IsIPAddress(char const* ipaddress) { -- cgit v1.2.3