Don't double count the leap day in a leap year
authorTheodore Tso <tytso@mit.edu>
Fri, 3 Feb 1995 19:34:56 +0000 (19:34 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 3 Feb 1995 19:34:56 +0000 (19:34 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4903 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/gmt_mktime.c

index 2c26baa8d4ae16c839fc915148316fe6f1dd9e3f..c5d032b5a31e1bdbd6fd5dec2b539aa947e1a7e7 100644 (file)
@@ -1,3 +1,8 @@
+Fri Feb  3 08:24:18 1995  Theodore Y. Ts'o  (tytso@dcl)
+
+       * gmt_mktime.c (gmt_mktime): Don't double count the leap day in a
+               leap year.
+
 Sun Jan 22 18:23:37 1995  John Gilmore  (gnu@cygnus.com)
 
        * get_krbhst.c (krb5_get_krbhst):  Declare realm argument const,
index 01d87dd4802a33d6d867e27f2826f8a54fc7124c..18973e1387b733479c0cb187b8413e16ba19156f 100644 (file)
@@ -60,7 +60,7 @@ time_t gmt_mktime(t)
   accum *= 365;                        /* 365 days/normal year */
 
   /* add in leap day for all previous years */
-  accum += (t->tm_year - 68) / 4;
+  accum += (t->tm_year - 69) / 4;
   /* add in leap day for this year */
   if(t->tm_mon >= 2)           /* march or later */
     if(hasleapday(t->tm_year)) accum += 1;