diff options
author | ache <ache@FreeBSD.org> | 2000-06-22 16:48:41 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2000-06-22 16:48:41 +0000 |
commit | 77729ceb43ab5503e7ad253493cf45995d695c40 (patch) | |
tree | 86fb6e644a653ca66c18488f0b08149465443594 /usr.sbin/pw/pw_log.c | |
parent | 23559508fb225c1fb2657d8bf0a65a8144779538 (diff) | |
download | FreeBSD-src-77729ceb43ab5503e7ad253493cf45995d695c40.zip FreeBSD-src-77729ceb43ab5503e7ad253493cf45995d695c40.tar.gz |
Localize time/date.
Use ISO 8601 date in logs.
Fix wrong argument type in ctype functions.
Diffstat (limited to 'usr.sbin/pw/pw_log.c')
-rw-r--r-- | usr.sbin/pw/pw_log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pw/pw_log.c b/usr.sbin/pw/pw_log.c index 6f72c0d..fc85828 100644 --- a/usr.sbin/pw/pw_log.c +++ b/usr.sbin/pw/pw_log.c @@ -55,7 +55,8 @@ pw_log(struct userconf * cnf, int mode, int which, char const * fmt,...) if ((name = getenv("LOGNAME")) == NULL && (name = getenv("USER")) == NULL) name = "unknown"; - strftime(nfmt, sizeof nfmt, "%d-%b-%Y %R ", t); + /* ISO 8601 International Standard Date format */ + strftime(nfmt, sizeof nfmt, "%Y-%m-%d %T ", t); l = strlen(nfmt); sprintf(nfmt + strlen(nfmt), "[%s:%s%s] %s\n", name, Which[which], Modes[mode], fmt); va_start(argp, fmt); |