From 795b46cf8fde240b486c27800a79d50fea9c8b7d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 May 2002 13:18:44 +0000 Subject: * localtime.cc (tzsetwall): Use wildabbr if generated timezone name length < 3. --- winsup/cygwin/localtime.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'winsup/cygwin/localtime.cc') diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 48006e25a..8267bdebb 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -1396,10 +1396,10 @@ tzsetwall P((void)) dst = cp = buf; for (src = tz.StandardName; *src; src++) if (is_upper(*src)) *dst++ = *src; - if (cp == dst) + if ((dst - cp) < 3) { - /* In Asian Windows, tz.StandardName may not contain - the timezone name. */ + /* In non-english Windows, converted tz.StandardName + may not contain a valid standard timezone name. */ strcpy(cp, wildabbr); cp += strlen(wildabbr); } @@ -1414,11 +1414,11 @@ tzsetwall P((void)) dst = cp; for (src = tz.DaylightName; *src; src++) if (is_upper(*src)) *dst++ = *src; - if (cp == dst) + if ((dst - cp) < 3) { - /* In Asian Windows, tz.StandardName may not contain - the daylight name. */ - strcpy(buf, wildabbr); + /* In non-english Windows, converted tz.DaylightName + may not contain a valid daylight timezone name. */ + strcpy(cp, wildabbr); cp += strlen(wildabbr); } else -- cgit v1.2.3