stime.c (krb_stime):
authorTheodore Tso <tytso@mit.edu>
Sat, 9 May 1998 00:04:39 +0000 (00:04 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 9 May 1998 00:04:39 +0000 (00:04 +0000)
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

src/lib/krb4/ChangeLog
src/lib/krb4/klog.c
src/lib/krb4/log.c
src/lib/krb4/stime.c

index decfc184fe92ef700a4599c380458b1988ff9144..e588b07c9267655f82408e92caa03a985e822350 100644 (file)
@@ -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): 
index e04e0200dd68234b40ea40070364a0e62c3e3c3e..def5a59ccf0fb886f9b369fecafb87636b3fec7a 100644 (file)
@@ -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);
index d317550556deee4ba995b8bd0c4dfc24e87f3599..573481362c525132ddd9c725dd3984c1d9748070 100644 (file)
@@ -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 {
index f90fbc566ae08ef2f847e3f7b578c1be7ef06cd1..780455ce74957a30ecbe96513baf45e152549670 100644 (file)
@@ -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;
 }