X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/7b3154538d24958c2e3ed0e20e80bb33d3d98a3a..3ef341abe440ece07f8deed59fb026ab020e805:/sbr/dtime.c diff --git a/sbr/dtime.c b/sbr/dtime.c index 7ec75511..aa346216 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -12,16 +12,6 @@ #include #include -#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) -extern int daylight; -extern long timezone; -extern char *tzname[]; -#endif - -#ifndef abs -# define abs(a) (a >= 0 ? a : -a) -#endif - /* * The number of days in the year, accounting for leap years */ @@ -109,14 +99,8 @@ dlocaltime (time_t *clock) if (tm->tm_isdst) tw.tw_flags |= TW_DST; -#ifdef HAVE_STRUCT_TM_TM_GMTOFF - tw.tw_zone = tm->tm_gmtoff / 60; - if (tm->tm_isdst) /* if DST is in effect */ - tw.tw_zone -= 60; /* reset to normal offset */ -#else tzset(); tw.tw_zone = -(timezone / 60); -#endif tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP;