ロケール: デフォルトの時刻形式の変更

ロケール: デフォルトの時刻形式の変更

Debian Wheezyシステムのデフォルトの時間形式を変更する必要があります。私はフォローしていますこれどのように。

その行を修正しました/usr/share/i18n/locales/en_US

d_t_fmt "<U0025><U0059><U002D><U0025><U0062><U002D><U0025><U0064><U0020><U0020><U0025><U0054>"
d_fmt   "<U0025><U0059><U002D><U0025><U0062><U002D><U0025><U0064>"
t_fmt   "<U0025><U0054>"

次に ro compile locale コマンドを実行しました。localedef -f UTF-8 -i en_US en_US.UTF-8

私のロケールは/etc/default/localeen_US.UTF-8に設定されています。

LANG=en_US.UTF-8
LC_COLLATE=C
LC_TIME="en_US.UTF-8"

ただし、再起動後も変更は適用されません。私は一歩も逃したのですか?

更新:詳細情報表示モードでコマンドを実行すると、多くのエラーが発生します。

localedef -v -c -f UTF-8 -i custom custom.UTF-8

custom:34: non-symbolic character value should not be used
en_GB:50: non-symbolic character value should not be used
i18n:1756: non-symbolic character value should not be used
en_GB:59: non-symbolic character value should not be used
custom:40: non-symbolic character value should not be used
iso14651_t1:3: non-symbolic character value should not be used
iso14651_t1_common:6323: LC_COLLATE: symbol `pure-ta-zh' not known
translit_neutral:10: non-symbolic character value should not be used
translit_neutral:17: non-symbolic character value should not be used
LC_NAME: field `name_gen' not defined
LC_IDENTIFICATION: no identification for category `LC_MEASUREMENT'
LC_CTYPE: table for class "upper": 10634005407197270931 bytes
LC_CTYPE: table for class "lower": 10634005407197270931 bytes
LC_CTYPE: table for class "alpha": 10634005407197270931 bytes
LC_CTYPE: table for class "digit": 10634005407197270931 bytes
LC_CTYPE: table for class "xdigit": 10634005407197270931 bytes
LC_CTYPE: table for class "space": 10634005407197270931 bytes
LC_CTYPE: table for class "print": 10634005407197270931 bytes
LC_CTYPE: table for class "graph": 10634005407197270931 bytes
LC_CTYPE: table for class "blank": 10634005407197270931 bytes
LC_CTYPE: table for class "cntrl": 10634005407197270931 bytes
LC_CTYPE: table for class "punct": 10634005407197270931 bytes
LC_CTYPE: table for class "alnum": 10634005407197270931 bytes
LC_CTYPE: table for class "combining": 10634005407197270931 bytes
LC_CTYPE: table for class "combining_level3": 10634005407197270931 bytes
LC_CTYPE: table for map "toupper": 10634005407197270931 bytes
LC_CTYPE: table for map "tolower": 10634005407197270931 bytes
LC_CTYPE: table for map "totitle": 10634005407197270931 bytes
LC_CTYPE: table for width: 0 bytes

ベストアンサー1

何を見せますかlocale?値に設定された「LC_ALL」が表示された場合は、そのunset値が必要になる場合があります。

unset LC_ALL

次に、次のことを試してください。

export LANG="en_US.UTF-8"
export LC_COLLATE="C"
export LC_TIME="en_US.UTF-8"

機能している場合は、これらのエクスポートを~/.bashrcファイルに追加します。 (おそらくunset LC_ALL前のコマンドかもしれません)

LC_ALL
    This variable determines the values for all locale categories. The value of the LC_ALL environment variable has precedence over any of the other environment variables starting with LC_ (LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and the LANG environment variable. 

http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html

おすすめ記事