summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index ab6d23f..228937e 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -894,7 +894,7 @@ ConvertLocalToUTCUsingC(
Tcl_MutexLock(&clockMutex);
errno = 0;
fields->seconds = (Tcl_WideInt) mktime(&timeVal);
- localErrno = errno;
+ localErrno = (fields->seconds == -1) ? errno : 0;
Tcl_MutexUnlock(&clockMutex);
/*