diff options
author | Treeston <treeston.mmoc@gmail.com> | 2019-08-04 12:22:57 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-18 15:28:45 +0100 |
commit | 51fbda4223442635a35d3225c0797d0151ea7051 (patch) | |
tree | 58c157637d44c568f7d720dddbce2c28c7ee9427 /src/common/Utilities/Util.cpp | |
parent | 6d5086da1747816e1a4e8518e16ab1923de22e1a (diff) |
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)
Diffstat (limited to 'src/common/Utilities/Util.cpp')
-rw-r--r-- | src/common/Utilities/Util.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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) { |