From: Theodore Tso Date: Sat, 9 May 1998 00:04:39 +0000 (+0000) Subject: stime.c (krb_stime): X-Git-Tag: krb5-1.1-beta1~728 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=acd6905057e98ed0e7842bbf2a98c9ea9fe7902a;p=krb5.git stime.c (krb_stime): log.c (krb_new_log, krb_log): klog.c (klog): Print the year using 4 digits to avoid Y2K issues. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10558 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index decfc184f..e588b07c9 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,9 @@ +1998-05-08 Theodore Ts'o + + * stime.c (krb_stime): + * log.c (krb_new_log, krb_log): + * klog.c (klog): Print the year using 4 digits to avoid Y2K issues. + Wed Apr 15 18:07:00 1998 Tom Yu * Makefile.in (SHLIB_EXPDEPS): diff --git a/src/lib/krb4/klog.c b/src/lib/krb4/klog.c index e04e0200d..def5a59cc 100644 --- a/src/lib/krb4/klog.c +++ b/src/lib/krb4/klog.c @@ -88,8 +88,8 @@ char * klog(type,format,a1,a2,a3,a4,a5,a6,a7,a8,a9,a0) (void) time(&now); tm = localtime(&now); - fprintf(logfile,"%2d-%s-%02d %02d:%02d:%02d ",tm->tm_mday, - month_sname(tm->tm_mon + 1),tm->tm_year, + fprintf(logfile,"%2d-%s-%d %02d:%02d:%02d ",tm->tm_mday, + month_sname(tm->tm_mon + 1),1900+tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec); fprintf(logfile,"%s\n",logtxt); (void) fclose(logfile); diff --git a/src/lib/krb4/log.c b/src/lib/krb4/log.c index d31755055..573481362 100644 --- a/src/lib/krb4/log.c +++ b/src/lib/krb4/log.c @@ -69,8 +69,8 @@ void krb_log(format,a1,a2,a3,a4,a5,a6,a7,a8,a9,a0) (void) time(&now); tm = localtime(&now); - fprintf(logfile,"%2d-%s-%02d %02d:%02d:%02d ",tm->tm_mday, - month_sname(tm->tm_mon + 1),tm->tm_year, + fprintf(logfile,"%2d-%s-%d %02d:%02d:%02d ",tm->tm_mday, + month_sname(tm->tm_mon + 1),1900+tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec); fprintf(logfile,format,a1,a2,a3,a4,a5,a6,a7,a8,a9,a0); fprintf(logfile,"\n"); @@ -115,8 +115,8 @@ krb_new_log(t,string) if (t) { tm = localtime(&t); - fprintf(logfile,"\n%2d-%s-%02d %02d:%02d:%02d %s",tm->tm_mday, - month_sname(tm->tm_mon + 1),tm->tm_year, + fprintf(logfile,"\n%2d-%s-%d %02d:%02d:%02d %s",tm->tm_mday, + month_sname(tm->tm_mon + 1),1900+tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec, string); } else { diff --git a/src/lib/krb4/stime.c b/src/lib/krb4/stime.c index f90fbc566..780455ce7 100644 --- a/src/lib/krb4/stime.c +++ b/src/lib/krb4/stime.c @@ -32,8 +32,8 @@ char *krb_stime(t) adjusted_time = *t - CONVERT_TIME_EPOCH; tm = localtime(&adjusted_time); - (void) sprintf(st,"%2d-%s-%02d %02d:%02d:%02d",tm->tm_mday, - month_sname(tm->tm_mon + 1),tm->tm_year, + (void) sprintf(st,"%2d-%s-%d %02d:%02d:%02d",tm->tm_mday, + month_sname(tm->tm_mon + 1),1900+tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec); return st; }