From f4ad7b7ac6ab9e2e446732e01d21850973fc7812 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 3 Feb 1995 19:34:56 +0000 Subject: [PATCH] Don't double count the leap day in a leap year git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4903 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/gmt_mktime.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 2c26baa8d..c5d032b5a 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -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, diff --git a/src/lib/krb5/os/gmt_mktime.c b/src/lib/krb5/os/gmt_mktime.c index 01d87dd48..18973e138 100644 --- a/src/lib/krb5/os/gmt_mktime.c +++ b/src/lib/krb5/os/gmt_mktime.c @@ -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; -- 2.26.2