I have just installed ubuntu server 19.10. When I enter the date command I get the following output
Sun 10 Nov 2019 05:16:05 PM AEDT
My old server running 18.04 gives this output
Sun Nov 10 17:16:16 AEDT 2019
Note the difference in both the time given and the format.
Can someone advise me where the default format for date output is configured. I can't see anything in the environment variables.
Note that timedatectl for both give similar results, the only difference being that 18.04 is using systemd-timesyncd and 19.10 is using NTP.
18.04
Local time: Sun 2019-11-10 17:16:18 AEDT
Universal time: Sun 2019-11-10 06:16:18 UTC
RTC time: Sun 2019-11-10 06:16:18
Time zone: Australia/Melbourne (AEDT, +1100)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
19.10
Local time: Sun 2019-11-10 17:16:12 AEDT
Universal time: Sun 2019-11-10 06:16:12 UTC
RTC time: Sun 2019-11-10 06:16:12
Time zone: Australia/Melbourne (AEDT, +1100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
dateoutput should come from/usr/share/i18n/locales/[your location](for [your location] checkecho $LC_TIMEorecho $LANG). I guessdate_fmtis what you are searching for. But before changing any system generated file (locale-gen), I suggest to useLC_TIME=en_AU.UTF-8 dateorLC_TIME=POSIX date... Details on 'locale': https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html – LupusE Nov 10 '19 at 09:25en_USso that will need to change to en_AU. Further to that, the locale file en_US does not have adate_fmtsetting on V18.04 but isdate_fmt "%a %d %b %Y %r %Z"on V19.10. Looking at en_AU, both versions havedate_fmt "%a %e %b %H:%M:%S %Z %Y"– dBags Nov 11 '19 at 19:29