diff options
| author | Paul Park <pjpark@mit.edu> | 1995-05-16 14:35:02 +0000 |
|---|---|---|
| committer | Paul Park <pjpark@mit.edu> | 1995-05-16 14:35:02 +0000 |
| commit | 6fb8f6fd32aee872cec0c338c977037e97f362ba (patch) | |
| tree | e3f2f4d9b3b44eed7c6022c02ef6a72421fc9f1c /src/lib | |
| parent | 184a3b9bda443aadaf2f81e1563f6b573fa6f650 (diff) | |
Fix nitty bug in gmt_mktime()
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5818 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/os/ChangeLog | 6 | ||||
| -rw-r--r-- | src/lib/krb5/os/gmt_mktime.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 7dbd64372..cee01f0fa 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -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 diff --git a/src/lib/krb5/os/gmt_mktime.c b/src/lib/krb5/os/gmt_mktime.c index 7cfeba201..1fac90a93 100644 --- a/src/lib/krb5/os/gmt_mktime.c +++ b/src/lib/krb5/os/gmt_mktime.c @@ -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 */ |
