diff options
Diffstat (limited to 'win/tclWinTime.c')
-rw-r--r-- | win/tclWinTime.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 396adfa..1ab09a8 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.21 2003/12/16 02:55:38 davygrvy Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.22 2004/03/18 18:56:04 rmax Exp $ */ #include "tclWinInt.h" @@ -545,10 +545,9 @@ TclpGetTZName(int dst) struct tm * TclpGetDate(t, useGMT) - TclpTime_t t; + CONST time_t t; int useGMT; { - const time_t *tp = (const time_t *) t; struct tm *tmPtr; time_t time; @@ -571,14 +570,14 @@ TclpGetDate(t, useGMT) H. Giese, June 2003 */ #ifdef __BORLANDC__ - if (*tp >= SECSPERDAY) { + if (t >= SECSPERDAY) { #else - if (*tp >= 0) { + if (t >= 0) { #endif return localtime(tp); } - time = *tp - timezone; + time = t - timezone; /* * If we aren't near to overflowing the long, just add the bias and @@ -586,11 +585,11 @@ TclpGetDate(t, useGMT) * the result at the end. */ - if (*tp < (LONG_MAX - 2 * SECSPERDAY) - && *tp > (LONG_MIN + 2 * SECSPERDAY)) { + if (t < (LONG_MAX - 2 * SECSPERDAY) + && t > (LONG_MIN + 2 * SECSPERDAY)) { tmPtr = ComputeGMT(&time); } else { - tmPtr = ComputeGMT(tp); + tmPtr = ComputeGMT(&t); tzset(); @@ -626,7 +625,7 @@ TclpGetDate(t, useGMT) tmPtr->tm_wday = (tmPtr->tm_wday + time) % 7; } } else { - tmPtr = ComputeGMT(tp); + tmPtr = ComputeGMT(&t); } return tmPtr; } |