mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-12-15 14:50:44 -08:00
Fix Unix/Windows Compile (timezone issue)
This commit is contained in:
parent
13d8210867
commit
741bbd3109
2 changed files with 10 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue