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 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);
/*