Fix Unix/Windows Compile (timezone issue)

This commit is contained in:
mik1893
2016-06-29 08:10:12 +01:00
committed by Yehonal
parent 13d8210867
commit 741bbd3109
2 changed files with 10 additions and 1 deletions

View File

@@ -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

View File

@@ -376,7 +376,12 @@ class ByteBuffer
lt.tm_mon = (packedDate >> 20) & 0xF;
lt.tm_year = ((packedDate >> 24) & 0x1F) + 100;
return uint32(mktime(&lt) + _timezone);
#ifdef OS_WIN
return uint32(mktime(&lt) + _timezone);
#else
return uint32(mktime(&lt) + timezone);
#endif
}
ByteBuffer& ReadPackedTime(uint32& time)