Fix nitty bug in gmt_mktime()
authorPaul Park <pjpark@mit.edu>
Tue, 16 May 1995 14:35:02 +0000 (14:35 +0000)
committerPaul Park <pjpark@mit.edu>
Tue, 16 May 1995 14:35:02 +0000 (14:35 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5818 dc483132-0cff-0310-8789-dd5450dbe970

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

index 7dbd6437220526e92e3dd98f8cc5ffe76b120afc..cee01f0fa153dff13890a8ee61903aba9afa2da2 100644 (file)
@@ -1,3 +1,9 @@
+
+Tue May 16 10:33:03 EDT 1995   Paul Park       (pjpark@mit.edu)
+       * gmt_mktime.c  - Use the actual year instead of the number of years
+                         since 1900 when determining if a year has a leapday.
+                         Makes dates after February in the year 2000 correct.
+
 Mon May  8 22:19:23 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
        * read_pwd.c (krb5_read_password): use volatile on all
index 7cfeba201de7b573a526b3a14b59f971c71b7408..1fac90a93acf71aced9b044253768c4218df1700 100644 (file)
@@ -65,7 +65,7 @@ time_t gmt_mktime(t)
   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;
+    if(hasleapday((t->tm_year + 1900))) accum += 1;
 
   accum += days_in_month[t->tm_mon];
   accum += t->tm_mday-1;       /* days of month are the only 1-based field */