I've been trying to change the default date format since past few days.
Current format:-
$date
Mon Aug 20 14:14:43 IST 2018
Expected format:-
$date
Monday August 20 14:14:43 IST 2018
Current locale
$locale
LANG=en_IN
LANGUAGE=
LC_CTYPE=en_IN
LC_NUMERIC="en_IN"
LC_TIME=en_DK
LC_COLLATE="en_IN"
LC_MONETARY="en_IN"
LC_MESSAGES="en_IN"
LC_PAPER="en_IN"
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT="en_IN"
LC_IDENTIFICATION="en_IN"
LC_ALL=
LC_TIME section in /usr/share/i18n/locales/en_DK
% date formats following ISO 8601-1988
d_t_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064><U0054><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064>"
t_fmt "<U0025><U0054>"
am_pm "";""
t_fmt_ampm ""
% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
I have referred this tutorial which I have come across to be the best and lengthy enough to be clear.
I'm using Ubuntu 16.04 stretch. I need to modify this en_DK file or create a custom locale that suits my need. Although there are several workarounds like creating aliases. But I prefer to know what is going wrong.
I would really recommend to use
instead somehow. Creating a custom locale for the purpose feels like overdoing it.
Edit:
An option might be to
date_fmt
in theen_DK
locale definition file and replace<U0061>
and<U0062>
with<U0041>
respective<U0042>
sudo locale-gen en_DK.UTF-8
You should also set
en_DK.UTF_8
forLC_TIME
, noten_DK
(the latter enables latin1 encoding).