Make sure the date string printed uses 4 digit years
authorTheodore Tso <tytso@mit.edu>
Thu, 14 May 1998 04:38:14 +0000 (04:38 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 14 May 1998 04:38:14 +0000 (04:38 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10568 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/str_conv.c

index 9cc9d761c428ba85b47c5a9c328eca8276a5cde1..bc7e1a507067e158dd2edec9e2c52cabcd752809 100644 (file)
@@ -1,3 +1,8 @@
+1998-05-12  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * str_conv.c (krb5_timestamp_to_sfstring): Make sure the date
+               string printed uses 4 digit years.
+
 1998-05-08  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * str_conv.c (krb5_string_to_timestamp, strptime): Fix routines to
index c059f838e09549f9404913c376ab048969461701..6346aef2345fffa1139043ea73353178484d56c4 100644 (file)
@@ -156,12 +156,12 @@ static const char ascan_rel_col_hm[]      = "%02d:%02d";
 #endif /* !HAVE_STRPTIME */
 #ifdef HAVE_STRFTIME
 static const char sftime_ldep_time[]   = "%c";
-static const char sftime_med_fmt[]     = "%d %b %y %T";
+static const char sftime_med_fmt[]     = "%d %b %Y %T";
 static const char sftime_short_fmt[]   = "%x %X";
-static const char sftime_last_fmt[]    = "%d/%m/%y %R";
+static const char sftime_last_fmt[]    = "%d/%m/%Y %R";
 #endif /* HAVE_STRFTIME */
-static const char sftime_default_fmt[] = "%02d/%02d/%02d %02d:%02d";
-static const size_t sftime_default_len = 2+1+2+1+2+1+2+1+2+1;
+static const char sftime_default_fmt[] = "%02d/%02d/%4d %02d:%02d";
+static const size_t sftime_default_len = 2+1+2+1+4+1+2+1+2+1;
 
 /* Delta time strings */
 static const char dtscan_dhms_notext[] = "%d-%02d:%02d:%02d";
@@ -674,7 +674,7 @@ krb5_timestamp_to_sfstring(timestamp, buffer, buflen, pad)
     if (!ndone) {
        if (buflen >= sftime_default_len) {
            sprintf(buffer, sftime_default_fmt,
-                   tmp->tm_mday, tmp->tm_mon+1, tmp->tm_year,
+                   tmp->tm_mday, tmp->tm_mon+1, 1900+tmp->tm_year,
                    tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
            ndone = strlen(buffer);
        }