mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
Fix Unix/Windows Compile (timezone issue)
This commit is contained in:
@@ -26,6 +26,10 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
|
||||
#define OS_WIN
|
||||
#endif
|
||||
|
||||
#define TRINITY_LITTLEENDIAN 0
|
||||
#define TRINITY_BIGENDIAN 1
|
||||
|
||||
|
||||
@@ -376,7 +376,12 @@ class ByteBuffer
|
||||
lt.tm_mon = (packedDate >> 20) & 0xF;
|
||||
lt.tm_year = ((packedDate >> 24) & 0x1F) + 100;
|
||||
|
||||
return uint32(mktime(<) + _timezone);
|
||||
#ifdef OS_WIN
|
||||
return uint32(mktime(<) + _timezone);
|
||||
#else
|
||||
return uint32(mktime(<) + timezone);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
ByteBuffer& ReadPackedTime(uint32& time)
|
||||
|
||||
Reference in New Issue
Block a user