summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-20 20:45:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-20 20:45:14 (GMT)
commit092703d99668fb06f01c3515abfb0fa27f9e42df (patch)
treed5e625f1e48108ac617b1caea95abe25344ebb44
parentdf18d9393c3f1336334fa37742e09461296575e7 (diff)
downloadtcl-092703d99668fb06f01c3515abfb0fa27f9e42df.zip
tcl-092703d99668fb06f01c3515abfb0fa27f9e42df.tar.gz
tcl-092703d99668fb06f01c3515abfb0fa27f9e42df.tar.bz2
Fix [32b88975f7]: clock format returns spurious errors
-rw-r--r--generic/tclClock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 38c4ec0..7d54edd 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -913,7 +913,7 @@ ConvertLocalToUTCUsingC(
Tcl_MutexLock(&clockMutex);
errno = 0;
fields->seconds = (Tcl_WideInt) mktime(&timeVal);
- localErrno = errno;
+ localErrno = (fields->seconds == -1) ? errno : 0;
Tcl_MutexUnlock(&clockMutex);
/*