summaryrefslogtreecommitdiffstats
path: root/win/tclWinTime.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinTime.c')
-rw-r--r--win/tclWinTime.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index de0e3dd..db2affd 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinTime.c,v 1.4 1999/04/16 00:48:10 stanton Exp $
+ * RCS: @(#) $Id: tclWinTime.c,v 1.5 1999/12/01 00:08:43 hobbs Exp $
*/
#include "tclWinInt.h"
@@ -219,17 +219,20 @@ TclpGetTZName(int dst)
Tcl_ExternalToUtf(NULL, NULL, zone, len, 0, NULL, name,
sizeof(tsdPtr->tzName), NULL, NULL, NULL);
}
- if ((name[0] == '\0')
- && (GetTimeZoneInformation(&tz) != TIME_ZONE_ID_UNKNOWN)) {
+ if (name[0] == '\0') {
+ if (GetTimeZoneInformation(&tz) == TIME_ZONE_ID_UNKNOWN) {
+ /*
+ * MSDN: On NT this is returned if DST is not used in
+ * the current TZ
+ */
+ dst = 0;
+ }
encoding = Tcl_GetEncoding(NULL, "unicode");
Tcl_ExternalToUtf(NULL, encoding,
(char *) ((dst) ? tz.DaylightName : tz.StandardName), -1,
0, NULL, name, sizeof(tsdPtr->tzName), NULL, NULL, NULL);
Tcl_FreeEncoding(encoding);
}
- if (name[0] == '\0') {
- return "%Z";
- }
return name;
}