Blog → Post


(TIP) Have date show 12 hour, rather than 24 hour, clock times,
by @admin, june 22, 2019, 12:10am utc

By default, bash will show a date and time in this format:

Sat Jun 22 22:04:22 EDT 2019

To see the date in 12-hour format, like this:

Sat, Jun 22, 2019 10:04:36 PM

...follow the steps below.

~$ ~$ date Sat Jun 22 22:04:22 EDT 2019 ~$ ~$ # edit ~/.bashrc and add this alias to the bottom (without the '#') ~$ # alias date='date +"%a, %h %d, %Y %r"' ~$ ~$ source .bashrc # to immediately implement this. ~$ ~$ date Sat, Jun 22, 2019 10:04:36 PM ~$
tags: All users, Tips
Footer done in Inkscape