1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Use %c for expire/change dates

This commit is contained in:
Andrey A. Chernov 2001-03-21 13:46:09 +00:00
parent 497c755856
commit b01e74b72e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74569

View File

@ -1155,9 +1155,9 @@ print_user(struct passwd * pwd, int pretty, int v7)
*p = (char) toupper((unsigned char)*p);
}
if (pwd->pw_expire > (time_t)0 && (tptr = localtime(&pwd->pw_expire)) != NULL)
strftime(acexpire, sizeof acexpire, "%a %Ef %Y %X", tptr);
strftime(acexpire, sizeof acexpire, "%c", tptr);
if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL)
strftime(pwexpire, sizeof pwexpire, "%a %Ef %Y %X", tptr);
strftime(pwexpire, sizeof pwexpire, "%c", tptr);
printf("Login Name: %-15s #%-12ld Group: %-15s #%ld\n"
" Full Name: %s\n"
" Home: %-26.26s Class: %s\n"