Localize ctype too.

Add weekday to showuser expired fields
This commit is contained in:
Andrey A. Chernov 2000-06-24 13:36:13 +00:00
parent 2d90744fd8
commit 39610c7229
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62034
2 changed files with 3 additions and 3 deletions

View file

@ -132,7 +132,7 @@ main(int argc, char *argv[])
umask(0); /* We wish to handle this manually */
LIST_INIT(&arglist);
(void)setlocale(LC_TIME, "");
(void)setlocale(LC_ALL, "");
/*
* Break off the first couple of words to determine what exactly

View file

@ -1146,9 +1146,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, "%Ef %Y %X", tptr);
strftime(acexpire, sizeof acexpire, "%a %Ef %Y %X", tptr);
if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL)
strftime(pwexpire, sizeof pwexpire, "%Ef %Y %X", tptr);
strftime(pwexpire, sizeof pwexpire, "%a %Ef %Y %X", tptr);
printf("Login Name: %-15s #%-12ld Group: %-15s #%ld\n"
" Full Name: %s\n"
" Home: %-26.26s Class: %s\n"