+
+Mon Aug 21 17:01:40 EDT 1995 Paul Park (pjpark@mit.edu)
+ * ktutil.c - Remove English-specific date handling and let timestamp_
+ to_sfstring() handle the formatting of the timestamp string.
+
#include "k5-int.h"
#include "ktutil.h"
#include <com_err.h>
+#include "adm_proto.h"
#include <ss/ss.h>
#include <stdio.h>
#ifdef HAS_STDLIB_H
krb5_context kcontext;
krb5_kt_list ktlist = NULL;
-static char *Month_names[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-
int main(argc, argv)
int argc;
char *argv[];
}
printf("%4d %4d ", i, lp->entry->vno);
if (show_time) {
+ char fmtbuf[18];
+ char fill;
+
stime = localtime((time_t *)&lp->entry->timestamp);
- printf("%2d-%s-%2d %02d:%02d:%02d ",
- stime->tm_mday,
- Month_names[stime->tm_mon],
- stime->tm_year,
- stime->tm_hour,
- stime->tm_min,
- stime->tm_sec);
+ fill = ' ';
+ if (!krb5_timestamp_to_sfstring((krb5_timestamp)lp->entry->
+ timestamp,
+ fmtbuf,
+ sizeof(fmtbuf),
+ &fill))
+ printf(fmtbuf);
}
printf("%40s", pname);
if (show_keys) {