mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix 'printf %T' ignoring the current locale in LC_TIME (#263)
src/lib/libast/tm/tmlocale.c: - Load the locale set by LC_TIME or LC_ALL if it hasn't been loaded before or if it was loaded previously but isn't the current locale. src/cmd/ksh93/tests/locale.sh: - Add a regression test using the nl_NL.UTF-8 and ja_JP.UTF-8 locales. Fixes: https://github.com/ksh93/ksh/issues/261
This commit is contained in:
parent
4a846a9d19
commit
504cbda269
3 changed files with 30 additions and 2 deletions
|
@ -637,8 +637,14 @@ tmlocale(void)
|
|||
else if (tm_info.deformat != tm_info.format[TM_DEFAULT])
|
||||
state.format = tm_info.deformat;
|
||||
}
|
||||
|
||||
/* load the locale set in LC_TIME */
|
||||
li = LCINFO(AST_LC_TIME);
|
||||
if (!li->data)
|
||||
if (!li->data || state.locale != li)
|
||||
{
|
||||
load(li);
|
||||
state.locale = li;
|
||||
}
|
||||
|
||||
return tm_info.format;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue