我需要更改Debian系统上的默认时间格式。我正在遵循这的方法。
我在/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编译地区localedef -f UTF-8 -i en_US en_US.UTF-8命令。
我在/etc/default/locale中的地区设置为en_US.UTF-8:
LANG=en_US.UTF-8
LC_COLLATE=C
LC_TIME="en_US.UTF-8"但是我没有看到任何改变的影响(即使在重新启动之后)。我是不是错过了一步?
UPDATE:当我在详细模式下运行命令时,我会得到很多错误:
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发布于 2018-04-04 18:51:12
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
https://unix.stackexchange.com/questions/78465
复制相似问题