I am looking to have my date
command show time:
mohi@DESKTOP-PM4LGGS:~/Dropbox/mpl$ date
Mon, Jul 30, 2018 3:31:41 PM
like I am seeing in my Git Bash
on my office Windows. How can I get my date
command show AM/PM time by default on my home Ubuntu 18.04 LTS (GNOME Terminal)
?
%r
is locale-dependent and is not guaranteed to contain AM/PM. For instance here on a GNU system, I get11:56:02 am BST
in a British locale and11:56:02
in a French locale. in the C/POSIX locale, you'd get01:23:44 PM
instead of1:23:44 PM
. – Stéphane Chazelas Jul 30 '18 at 11:00