feat(Core/Build): Patched to be buildable on FreeBSD 13.0-RELEASE (#9568)

This commit is contained in:
Kaiser
2021-12-08 18:06:26 -05:00
committed by GitHub
parent 85abfafb2b
commit fa46f13b09
3 changed files with 11 additions and 6 deletions

View File

@@ -89,6 +89,12 @@ time_t LocalTimeToUTCTime(time_t time)
{
#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__))
return time + _timezone;
#elif defined(__FreeBSD__)
struct tm tm;
gmtime_r(&time, &tm);
tm.tm_isdst = -1;
return mktime(&tm);
#else
return time + timezone;
#endif