[krbdev.mit.edu #7192] klist does not use localized time formatting
Sam Hartman via RT
rt-comment at krbdev.mit.edu
Thu Jul 5 16:41:08 EDT 2012
Here's the patch we're using in Debian for this:
I was planning on submitting after it made it into a Debian release:
Obviously the log message needs updating.
>From c13c7a9a3da805d69194e7841d9dc1a89e8bf2ba Mon Sep 17 00:00:00 2001
From: Sam Hartman <hartmans at debian.org>
Date: Tue, 29 Nov 2011 19:40:23 -0500
Subject: =?UTF-8?q?ticket:=20new=0Asubject:=20Respect=20locale=20for=20time=20?=
=?UTF-8?q?display?=
Call setlocale(LC_TIME) in klist and kadmin to get locale-specific
time display.
Patch-Name: time_locale
---
src/clients/klist/klist.c | 1 +
src/kadmin/cli/ss_wrapper.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c
index a9a917156f526e32b171de9be16356abbce9e4cd..f0d55e8 100644
--- a/src/clients/klist/klist.c
+++ b/src/clients/klist/klist.c
@@ -119,6 +119,7 @@ main(argc, argv)
int mode;
setlocale(LC_MESSAGES, "");
+ setlocale(LC_TIME, "");
progname = GET_PROGNAME(argv[0]);
name = NULL;
diff --git a/src/kadmin/cli/ss_wrapper.c b/src/kadmin/cli/ss_wrapper.c
index f86c215f0485df127f7d624df2afded46c2db33d..2608d8c 100644
--- a/src/kadmin/cli/ss_wrapper.c
+++ b/src/kadmin/cli/ss_wrapper.c
@@ -40,6 +40,7 @@ main(int argc, char *argv[])
int sci_idx, code = 0;
setlocale(LC_MESSAGES, "");
+ setlocale(LC_TIME, "");
whoami = ((whoami = strrchr(argv[0], '/')) ? whoami+1 : argv[0]);
request = kadmin_startup(argc, argv);
More information about the krb5-bugs
mailing list