summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2006-07-31 15:44:06 (GMT)
committerKevin B Kenny <kennykb@acm.org>2006-07-31 15:44:06 (GMT)
commit6bcbc3a1d65e342824a86a925d1bbbb42fd4de22 (patch)
treea75575091f37f74a14d383828205d4d0da1f220f /generic
parent3da9c09d810510b812376df89e54ef578a4571d4 (diff)
downloadtcl-6bcbc3a1d65e342824a86a925d1bbbb42fd4de22.zip
tcl-6bcbc3a1d65e342824a86a925d1bbbb42fd4de22.tar.gz
tcl-6bcbc3a1d65e342824a86a925d1bbbb42fd4de22.tar.bz2
Bug 1531530
Diffstat (limited to 'generic')
-rw-r--r--generic/tclClock.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 655dedc..ee0291e 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.52 2006/07/31 03:27:12 kennykb Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.53 2006/07/31 15:44:06 kennykb Exp $
*/
#include "tclInt.h"
@@ -792,14 +792,15 @@ ConvertLocalToUTCUsingC(
struct tm timeVal;
int localErrno;
int secondOfDay;
+ Tcl_WideInt jsec;
/*
* Convert the given time to a date.
*/
- fields->julianDay = (int) ((fields->localSeconds + JULIAN_SEC_POSIX_EPOCH)
- / SECONDS_PER_DAY);
- secondOfDay = (int)(fields->localSeconds % SECONDS_PER_DAY);
+ jsec = fields->localSeconds + JULIAN_SEC_POSIX_EPOCH;
+ fields->julianDay = (int) (jsec / SECONDS_PER_DAY);
+ secondOfDay = (int)(jsec % SECONDS_PER_DAY);
if (secondOfDay < 0) {
secondOfDay += SECONDS_PER_DAY;
--fields->julianDay;