11 # include <sys/time.h>
18 #define ZONE(x) (((struct tm *)x)->tm_zone)
19 #define SETZONE(x,z) (((struct tm *)x)->tm_zone = z)
20 #define GMTOFF(x) (((struct tm *)x)->tm_gmtoff)
21 #else /* ! HAVE_TM_ZONE */
22 # if HAVE_TZNAME || cygwin32_TARGET_OS
23 #if cygwin32_TARGET_OS
26 extern char *tzname[2];
28 # define ZONE(x) (((struct tm *)x)->tm_isdst ? tzname[1] : tzname[0])
30 # else /* ! HAVE_TZNAME */
31 /* We're in trouble. If you should end up here, please report this as a bug. */
32 # error Dont know how to get at timezone name on your OS.
33 # endif /* ! HAVE_TZNAME */
34 /* Get the offset in secs from UTC, if (struct tm) doesn't supply it. */
36 extern TYPE_TIMEZONE timezone;
39 extern time_t altzone;
40 # define GMTOFF(x) (((struct tm *)x)->tm_isdst ? altzone : timezone)
41 # else /* ! HAVE_ALTZONE */
42 /* Assume that DST offset is 1 hour ... */
43 # define GMTOFF(x) (((struct tm *)x)->tm_isdst ? (timezone - 3600) : timezone)
44 # endif /* ! HAVE_ALTZONE */
45 #endif /* ! HAVE_TM_ZONE */
47 #endif /* TIMEZONE_H */