* localtime.cc (tzsetwall): Use wildabbr if generated timezone name
length < 3.
This commit is contained in:
parent
3769952b4d
commit
795b46cf8f
|
@ -1,3 +1,8 @@
|
||||||
|
2002-04-28 Norbert Schulze <norbert.schulze@web.de>
|
||||||
|
|
||||||
|
* localtime.cc (tzsetwall): Use wildabbr if generated timezone name
|
||||||
|
length < 3.
|
||||||
|
|
||||||
2002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
|
2002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* spawn.cc (spawn_guts): Move call to set_process_privilege()
|
* spawn.cc (spawn_guts): Move call to set_process_privilege()
|
||||||
|
|
|
@ -1396,10 +1396,10 @@ tzsetwall P((void))
|
||||||
dst = cp = buf;
|
dst = cp = buf;
|
||||||
for (src = tz.StandardName; *src; src++)
|
for (src = tz.StandardName; *src; src++)
|
||||||
if (is_upper(*src)) *dst++ = *src;
|
if (is_upper(*src)) *dst++ = *src;
|
||||||
if (cp == dst)
|
if ((dst - cp) < 3)
|
||||||
{
|
{
|
||||||
/* In Asian Windows, tz.StandardName may not contain
|
/* In non-english Windows, converted tz.StandardName
|
||||||
the timezone name. */
|
may not contain a valid standard timezone name. */
|
||||||
strcpy(cp, wildabbr);
|
strcpy(cp, wildabbr);
|
||||||
cp += strlen(wildabbr);
|
cp += strlen(wildabbr);
|
||||||
}
|
}
|
||||||
|
@ -1414,11 +1414,11 @@ tzsetwall P((void))
|
||||||
dst = cp;
|
dst = cp;
|
||||||
for (src = tz.DaylightName; *src; src++)
|
for (src = tz.DaylightName; *src; src++)
|
||||||
if (is_upper(*src)) *dst++ = *src;
|
if (is_upper(*src)) *dst++ = *src;
|
||||||
if (cp == dst)
|
if ((dst - cp) < 3)
|
||||||
{
|
{
|
||||||
/* In Asian Windows, tz.StandardName may not contain
|
/* In non-english Windows, converted tz.DaylightName
|
||||||
the daylight name. */
|
may not contain a valid daylight timezone name. */
|
||||||
strcpy(buf, wildabbr);
|
strcpy(cp, wildabbr);
|
||||||
cp += strlen(wildabbr);
|
cp += strlen(wildabbr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue