diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-11-21 12:25:22 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-12-02 15:57:03 +0100 |
commit | 45a5b6a9f04d2f605e7141b8da6e9cfa24711e07 (patch) | |
tree | 5d0f5890d888610ad4cf598db9c47e831a41eb35 /src/common/Utilities/Util.h | |
parent | 9daaa99ed49fc4ed63007bc932a411d33b5b7ef8 (diff) |
Core/Calendar: Implement different timezone support for ingame calendar
Closes #8390
Closes #29427
(cherry picked from commit b888b1b09f71a8b8b4a9d45c804a1f164fb65ac3)
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r-- | src/common/Utilities/Util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 62c8655b65f..14d633e2ae8 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -51,8 +51,11 @@ namespace Trinity TC_COMMON_API Optional<int32> MoneyStringToMoney(std::string const& moneyString); +#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) TC_COMMON_API struct tm* localtime_r(time_t const* time, struct tm *result); -TC_COMMON_API time_t LocalTimeToUTCTime(time_t time); +TC_COMMON_API struct tm* gmtime_r(time_t const* time, struct tm *result); +TC_COMMON_API time_t timegm(struct tm* tm); +#endif TC_COMMON_API time_t GetLocalHourTimestamp(time_t time, uint8 hour, bool onlyAfterTime = true); TC_COMMON_API tm TimeBreakdown(time_t t); |