summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-08-12 23:55:28 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-08-12 23:55:28 (GMT)
commit7280fa4dc46b70421656b113813334d972e01a16 (patch)
treebdfab0ac281a64d91630de66c881967982d44143 /generic
parentfd92e0a3792e30101410a91d8410e0e695bdc4e1 (diff)
downloadtcl-7280fa4dc46b70421656b113813334d972e01a16.zip
tcl-7280fa4dc46b70421656b113813334d972e01a16.tar.gz
tcl-7280fa4dc46b70421656b113813334d972e01a16.tar.bz2
bug 1257830
Diffstat (limited to 'generic')
-rw-r--r--generic/tclClock.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 47f1e74..9134ab4 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -12,7 +12,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.39 2005/08/09 13:31:27 dkf Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.40 2005/08/12 23:55:28 kennykb Exp $
*/
#include "tclInt.h"
@@ -319,8 +319,8 @@ TclClockMktimeObjCmd( ClientData clientData,
}
toConvert.tm_sec = i;
toConvert.tm_isdst = -1;
- toConvert.tm_wday = 0;
- toConvert.tm_yday = 0;
+ toConvert.tm_wday = -1;
+ toConvert.tm_yday = -1;
/* Convert the time. It is rumored that mktime is not thread
* safe on some platforms. */
@@ -334,7 +334,9 @@ TclClockMktimeObjCmd( ClientData clientData,
/* Return the converted time, or an error if conversion fails */
- if ( localErrno != 0 ) {
+ if ( localErrno != 0
+ || ( convertedTime == -1
+ && toConvert.tm_yday == -1 ) ) {
Tcl_SetObjResult
( interp,
Tcl_NewStringObj( "time value too large/small to represent",