summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclClock.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 00e708a..9cd8c74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,7 +21,9 @@
2005-11-30 Kevin Kenny <kennykb@acm.org>
* generic/tclClock.c: Fixed a bad refcount in previous commit that led
- to a corrupted heap. Thanks to Miguel Sofer for pointing out this bug.
+ to a corrupted heap. Thanks to Miguel Sofer for pointing out this
+ bug. Also silenced a warning that some compilers gave about the
+ excessively long constant for JULIAN_SEC_POSIX_EPOCH.
2005-11-29 Kevin Kenny <kennykb@acm.org>
diff --git a/generic/tclClock.c b/generic/tclClock.c
index a52ca26..891ea25 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.44 2005/11/30 14:48:04 kennykb Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.45 2005/11/30 15:09:41 kennykb Exp $
*/
#include "tclInt.h"
@@ -29,8 +29,10 @@
* Constants
*/
-#define JULIAN_SEC_POSIX_EPOCH ((Tcl_WideInt) 210866803200)
+#define JULIAN_DAY_POSIX_EPOCH 2440588
#define SECONDS_PER_DAY 86400
+#define JULIAN_SEC_POSIX_EPOCH (((Tcl_WideInt) JULIAN_DAY_POSIX_EPOCH) \
+ * SECONDS_PER_DAY)
#define FOUR_CENTURIES 146097 /* days */
#define JDAY_1_JAN_1_CE_JULIAN 1721424
#define JDAY_1_JAN_1_CE_GREGORIAN 1721426