summaryrefslogtreecommitdiffstats
path: root/pw/pw_log.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2000-06-22 16:48:41 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2000-06-22 16:48:41 +0000
commit1e27de559d679b242aaa482c232f2be295d2bf0e (patch)
tree53dd5c30922f8a2abdacd5bf4a7a03f390e9e87f /pw/pw_log.c
parent972568102323c8d0c9c190a7b280ae66c8e8b924 (diff)
downloadpw-darwin-1e27de559d679b242aaa482c232f2be295d2bf0e.tar.gz
pw-darwin-1e27de559d679b242aaa482c232f2be295d2bf0e.zip
Localize time/date.
Use ISO 8601 date in logs. Fix wrong argument type in ctype functions.
Diffstat (limited to 'pw/pw_log.c')
-rw-r--r--pw/pw_log.c3
1 files changed, 2 insertions, 1 deletions
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);