On newer GLIBC, they *always* check /etc/localtime for timzone information
if TZ isn't set. Older distros cache the localtime information. If TZ isn't
set, we'll set it here before entering out chroot (where /etc/localtime
isn't available).
Changelog
+* Fix hfaxd timezone handling on new GLIBC (BUG 723) (24 Mar 2006)
* Fix locking of recvq tiff files (BUG 739) (23 Mar 2006)
* fix batching of page jobs (23 Mar 2006)
* expand Class1JBIGSupport to allow for differentiation
tzname[1] = NULL;
#endif
+ // Latest glibc will revert to UTC in the chroot if it can't
+ // find the zoneinfo file and no TZ is set in the environment.
+ fxStr tz = fxStr::format("%s%d:%02d%s", tzname[0], (gmtoff / 3600),
+ ((gmtoff / 60) % 60), tzname[1]);
+ setenv("TZ", tz, 0);
+
cachedTIFF = NULL;
}