summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-05-29 00:19:39 (GMT)
committerhobbs <hobbs@noemail.net>2002-05-29 00:19:39 (GMT)
commit9d4edf627356503c4ac7252a64a152edde966304 (patch)
tree29125ebe484614a6acad3335d784da4ad422b93a /generic/tclClock.c
parent5a46afb46d8b2157077241e4f2d01e76220607fe (diff)
downloadtcl-9d4edf627356503c4ac7252a64a152edde966304.zip
tcl-9d4edf627356503c4ac7252a64a152edde966304.tar.gz
tcl-9d4edf627356503c4ac7252a64a152edde966304.tar.bz2
* tests/clock.test: added clock-9.1
* compat/strftime.c: * generic/tclClock.c: * generic/tclInt.decls: * generic/tclIntDecls.h: * unix/tclUnixTime.c: fix for Windows msvcrt mem leak caused by using an env(TZ) setting trick for in clock format -gmt 1. This also makes %s seem to work correctly with -gmt 1 as well as making it a lot faster by avoid the env(TZ) hack. TclpStrftime now takes useGMT as an arg. [Bug #559376] FossilOrigin-Name: 4d47e1cec7caf94d2cdda340e5467982b96c322b
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 5cfc675..9bf7ed0 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclClock.c,v 1.14 2002/01/25 20:40:55 dgp Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.15 2002/05/29 00:19:40 hobbs Exp $
*/
#include "tcl.h"
@@ -289,7 +289,7 @@ FormatClock(interp, clockVal, useGMT, format)
return TCL_OK;
}
-#ifndef HAVE_TM_ZONE
+#if !defined(HAVE_TM_ZONE) && !defined(WIN32)
/*
* This is a kludge for systems not having the timezone string in
* struct tm. No matter what was specified, they use the local
@@ -332,10 +332,10 @@ FormatClock(interp, clockVal, useGMT, format)
Tcl_MutexLock(&clockMutex);
result = TclpStrftime(buffer.string, (unsigned int) bufSize, format,
- timeDataPtr);
+ timeDataPtr, useGMT);
Tcl_MutexUnlock(&clockMutex);
-#ifndef HAVE_TM_ZONE
+#if !defined(HAVE_TM_ZONE) && !defined(WIN32)
if (useGMT) {
if (savedTZEnv != NULL) {
Tcl_SetVar2(interp, "env", "TZ", savedTZEnv, TCL_GLOBAL_ONLY);