X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fdtime.c;h=6acfaeb63477c51fb4d383003b6ccb1d33fd38e2;hb=2667af48dccbcb9e25709dea50451dd58d40aeae;hp=7ec75511a38928b7c635ffeb86ebd88185aa0e75;hpb=6a68057d8ef48bef3ee752741a53a629a2840e68;p=mmh diff --git a/sbr/dtime.c b/sbr/dtime.c index 7ec7551..6acfaeb 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -13,13 +13,7 @@ #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 /* @@ -286,7 +280,10 @@ dasctime (struct tws *tw, int flags) /* - * Get the timezone for given offset + * Get the timezone for given offset. + * This used to return a three-letter abbreviation for some offset + * values. But not many. Until there's a good way to do that, + * return the string representation of the numeric offset. */ char * @@ -303,11 +300,6 @@ dtimezone (int offset, int flags) hours = offset / 60; } - if (!(flags & TW_ZONE) && mins == 0) { - tzset(); - return ((flags & TW_DST) ? tzname[1] : tzname[0]); - } - #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST if (flags & TW_DST) hours += 1;