로케일: 기본 시간 형식 수정

로케일: 기본 시간 형식 수정

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

관련 정보