Navigation Menu

Skip to content

Commit

Permalink
stime.c (krb_stime):
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tytso committed May 9, 1998
1 parent 010d462 commit 9f14a16
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/lib/krb4/ChangeLog
@@ -1,3 +1,9 @@
1998-05-08 Theodore Ts'o <tytso@rsts-11.mit.edu>

* 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 <tlyu@mit.edu>

* Makefile.in (SHLIB_EXPDEPS):
Expand Down
4 changes: 2 additions & 2 deletions src/lib/krb4/klog.c
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/lib/krb4/log.c
Expand Up @@ -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");
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/krb4/stime.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9f14a16

Please sign in to comment.