From: David Levine Date: Wed, 8 Feb 2012 03:23:37 +0000 (-0600) Subject: Removed use of tzset()/tzname in dtimezone(). They caused the returned timezone... X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=0c926c599d9def7f70e674b7628a4bafd8cd6698;p=mmh Removed use of tzset()/tzname in dtimezone(). They caused the returned timezone string to be for the user's current timezone, but the function is supposed to return the string representation of the timezone of its argument. That will be numeric, e.g., +0100, now because we no longer have timezone name support. --- diff --git a/sbr/dtime.c b/sbr/dtime.c index a7c1574..6acfaeb 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -280,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 * @@ -297,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; diff --git a/test/tests/mhshow/test-cte-binary b/test/tests/mhshow/test-cte-binary index 359d42e..26b0f08 100644 --- a/test/tests/mhshow/test-cte-binary +++ b/test/tests/mhshow/test-cte-binary @@ -27,7 +27,7 @@ EOF # check it cat > $expected <