FreeBSD 15 and newer finally has the timezone variable (prior it that
was a compat function leftover from 4BSD). Older versions are still
supported. Both have tm_gmoff, which I've always preferred for better
portability.
Signed-off-by: Warner Losh <imp@bsdimp.com>
timeInfo->second = currTimeInfo.tm_sec;
timeInfo->msecs = 0;
timeInfo->isDST = currTimeInfo.tm_isdst;
-#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__MUSL__)
+#if (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__MUSL__)) || defined(__FreeBSD__)
timeInfo->zone = -currTimeInfo.tm_gmtoff / 60;
#else
timeInfo->zone = -1 * (timezone / SECONDS_IN_MIN);