summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-06 00:29:19 (GMT)
committerstanton <stanton>1999-04-06 00:29:19 (GMT)
commitd4e21212df64ceb6131545c1a2a9a27ce0a18f65 (patch)
tree188bfdf8ef16c3f0cae7192b007d394fd7cb2f89 /win
parentde5f61704275fc09a91918402a94f198a95aec31 (diff)
downloadtcl-d4e21212df64ceb6131545c1a2a9a27ce0a18f65.zip
tcl-d4e21212df64ceb6131545c1a2a9a27ce0a18f65.tar.gz
tcl-d4e21212df64ceb6131545c1a2a9a27ce0a18f65.tar.bz2
* tests/winTime.test:
* win/tclWinTime.c: Fixed crash in clock command that occurred when manipulating negative time values in timezones east of GMT. [Bug: 1142, 1458]
Diffstat (limited to 'win')
-rw-r--r--win/tclWinTime.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 196a0db..87953eb 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.1.2.3 1999/03/10 06:49:31 stanton Exp $
+ * RCS: @(#) $Id: tclWinTime.c,v 1.1.2.4 1999/04/06 00:29:19 stanton Exp $
*/
#include "tclWinInt.h"
@@ -269,10 +269,11 @@ TclpGetDate(t, useGMT)
* algorithm ignores daylight savings time before the epoch.
*/
- time = *tp - _timezone;
- if (time >= 0) {
+ if (*tp >= 0) {
return localtime(tp);
}
+
+ time = *tp - _timezone;
/*
* If we aren't near to overflowing the long, just add the bias and