From 5bd653754af8d012e11e518278bbde0971626082 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Thu, 22 Jun 2000 16:48:41 +0000 Subject: Localize time/date. Use ISO 8601 date in logs. Fix wrong argument type in ctype functions. --- pw/pw_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pw/pw_log.c') diff --git a/pw/pw_log.c b/pw/pw_log.c index 6f72c0d..fc85828 100644 --- a/pw/pw_log.c +++ b/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); -- cgit v1.2.3-56-ge451