summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authorkennykb <kennykb@noemail.net>2004-05-14 21:41:03 (GMT)
committerkennykb <kennykb@noemail.net>2004-05-14 21:41:03 (GMT)
commit0fc22eb39ee1ee43227bb8189df101c172c9e29e (patch)
treec43bfd28868eb27530e825eb959a36371420aeb7 /generic/tclClock.c
parent5a9804afc15a0f34fc5082a513adfd573e89020c (diff)
downloadtcl-0fc22eb39ee1ee43227bb8189df101c172c9e29e.zip
tcl-0fc22eb39ee1ee43227bb8189df101c172c9e29e.tar.gz
tcl-0fc22eb39ee1ee43227bb8189df101c172c9e29e.tar.bz2
2004-05-14 Kevin B. Kenny <kennykb@acm.org>
* generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls. FossilOrigin-Name: 27f78ca91bc1b33c909fb1eac370a3d41c65fa59
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 55c3bab..9683abb 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.20 2003/02/01 21:27:55 kennykb Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.20.2.1 2004/05/14 21:41:11 kennykb Exp $
*/
#include "tcl.h"
@@ -310,7 +310,7 @@ FormatClock(interp, clockVal, useGMT, format)
} else {
savedTZEnv = NULL;
}
- Tcl_SetVar2(interp, "env", "TZ", "GMT", TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, "env", "TZ", "GMT0", TCL_GLOBAL_ONLY);
savedTimeZone = timezone;
timezone = 0;
tzset();