FreeBSD doesn't implement the XSI extension that mandates the presence
of the daylight variable as described in:
http://pubs.opengroup.org/onlinepubs/
009696799/functions/tzset.html
So avoid using it for portability reasons. Use tm_isdst instead to
decide if daylight savings time conversions should be used or not.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
fprintf(lg->f, "%04d-%02d-%02d %02d:%02d:%02d %s ",
lt->tm_year+1900, lt->tm_mon+1, lt->tm_mday,
lt->tm_hour, lt->tm_min, lt->tm_sec,
- tzname[daylight ? !!lt->tm_isdst : 0]);
+ tzname[!!lt->tm_isdst]);
}
if (lg->flags & XTL_STDIOSTREAM_SHOW_PID)
fprintf(lg->f, "[%lu] ", (unsigned long)getpid());