+ {
+#if !defined (HAVE_TM_ZONE)
+ /* it seems the only way to tell non-GNU versions of strftime what
+ zone to use (for the %Z format) is to set TZ in the
+ environment. interrupts and thread switching must be deferred
+ until TZ is restored. */
+ char **oldenv = NULL;
+ SCM *velts = SCM_VELTS (stime);
+ int have_zone = 0;
+
+ if (!SCM_FALSEP (velts[10]) && *SCM_STRING_CHARS (velts[10]) != 0)
+ {
+ /* it's not required that the TZ setting be correct, just that
+ it has the right name. so try something like TZ=EST0.
+ using only TZ=EST would be simpler but it doesn't work on
+ some OSs, e.g., Solaris. */
+ SCM zone =
+ scm_string_append (scm_cons (velts[10],
+ scm_cons (scm_makfrom0str ("0"),
+ SCM_EOL)));
+
+ have_zone = 1;
+ SCM_DEFER_INTS;
+ oldenv = setzone (zone, SCM_ARG2, FUNC_NAME);
+ }
+#endif
+