Overview
| Artifact ID: | 1f9de7edf665adecc6ee1399c384c7d4459f0994 |
|---|---|
| Ticket: | 788187ffffffffffffffffffffffffffffffffff |
| Date: | 2003-08-14 00:06:54 |
| User: | jeremysc |
| Artifact Attached: | 0a8a848ce87570caaace2cb5f7811b2ae4907a7f |
| Filename: | tclpatch20030813.txt |
| Description: | tclpatch20030813.txt |
Content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31--- /home/jeremy/tcl8.4.4/win/tclWinTime.c Sat May 10 15:42:26 2003 +++ tcl8.4.4/win/tclWinTime.c Wed Aug 13 11:52:52 2003 @@ -465,6 +465,8 @@ Tcl_Encoding encoding; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); char *name = tsdPtr->tzName; + WCHAR *abbr; + int a, b; /* * tzset() under Borland doesn't seem to set up tzname[] at all. @@ -517,9 +519,18 @@ */ dst = 0; } + if (dst) + abbr=tz.DaylightName; + else + abbr=tz.StandardName; + for(a=0,b=0;abbr[a]&&a<32;a++) { + if (iswupper(abbr[a])) + abbr[b++]=abbr[a]; + } + abbr[b]=0; encoding = Tcl_GetEncoding(NULL, "unicode"); Tcl_ExternalToUtf(NULL, encoding, - (char *) ((dst) ? tz.DaylightName : tz.StandardName), -1, + (char *)abbr, -1, 0, NULL, name, sizeof(tsdPtr->tzName), NULL, NULL, NULL); Tcl_FreeEncoding(encoding); }