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)
23 extern char *tzname[2];
24 #define ZONE(x) (((struct tm *)x)->tm_isdst ? tzname[1] : tzname[0])
27 /* We're in trouble. If you should end up here, please report this as a bug. */
28 #error Dont know how to get at timezone name on your OS.
30 /* Get the offset in secs from UTC, if (struct tm) doesn't supply it. */
31 extern time_t timezone;
33 extern time_t altzone;
34 #define GMTOFF(x) (((struct tm *)x)->tm_isdst ? altzone : timezone)
36 /* Assume that DST offset is 1 hour ... */
37 #define GMTOFF(x) (((struct tm *)x)->tm_isdst ? (timezone - 3600) : timezone)