util/time: avoid tm_gmtoff on Solaris

Skip tm_gmtoff and tm_zone initialization on Solaris where those struct tm members are not available.
pull/15601/head
Martin Rehak 3 months ago committed by Victor Julien
parent cf65f7692a
commit 823322cb1c

@ -463,7 +463,7 @@ time_t SCMkTimeUtc (struct tm *tp)
result += tp->tm_min;
result *= 60;
result += tp->tm_sec;
#ifndef OS_WIN32
#if !defined(OS_WIN32) && !defined(__sun)
if (tp->tm_gmtoff)
result -= tp->tm_gmtoff;
#endif
@ -498,7 +498,7 @@ int SCStringPatternToTime (char *string, const char **patterns, int num_patterns
tp->tm_hour = tp->tm_min = tp->tm_sec = 0;
tp->tm_year = tp->tm_mon = tp->tm_mday = tp->tm_wday = INT_MIN;
tp->tm_isdst = -1;
#ifndef OS_WIN32
#if !defined(OS_WIN32) && !defined(__sun)
tp->tm_gmtoff = 0;
tp->tm_zone = NULL;
#endif

Loading…
Cancel
Save