I want to have all the locales set to en_US.UTF-8
, but I don’t want 12h time (AM/PM).
Modify /etc/login.conf
as follows:
--- /etc/login.conf.orig 2016-05-17 20:19:47.189836683 +0200 +++ /etc/login.conf 2016-05-17 20:04:48.151898313 +0200 @@ -26,7 +26,7 @@ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,LC_COLLATE=C:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ @@ -44,7 +44,9 @@ :pseudoterminals=unlimited:\ :priority=0:\ :ignoretime@:\ - :umask=022: + :umask=022:\ + :charset=UTF-8:\ + :lang=en_US.UTF-8: # # A collection of common class names - forward them all to 'default'
After changing execute sudo cap_mkdb /etc/login.conf
.
To change to 24h clock in uptime
, w
etc. Change /usr/share/locale/en_US.UTF-8/LC_TIME
as follows:
--- LC_TIME.orig 2016-05-17 20:14:40.018856258 +0200 +++ LC_TIME 2016-05-17 20:15:36.835860995 +0200 @@ -39,8 +39,8 @@ %H:%M:%S %m/%d/%Y %a %b %e %X %Y -AM -PM + + %a %b %e %X %Z %Y January February @@ -55,4 +55,4 @@ November December md -%I:%M:%S %p +
Note: Don’t remove the lines, only all characters on the lines.
References:
- Using UTF-8 (Unicode) on FreeBSD [b1c1l1.com]
- 24 hour clock format [forums.freebsd.org]