1

I want to set my linux machine box 12 hours format,how to set it ,please advise

I am able to display with #date +%r,but wanted to set it permanently

-1

You can set LC_TIME to a different locale. Using Date:

$ LC_TIME=en_US.UTF_8 date "+%c"
Thu 20 Aug 2015 04:28:21 PM EDT
$ LC_TIME=en_UK.UTF_8 date "+%c"
Thu Aug 20 16:28:27 2015

This can be changed permanently in etc/default/locale.

Note however that not all programs honor this setting. So it may not work system-wide. For instance the clock in the Ubuntu top menu has its own configuration for time format.

  • This does not answer the question. Which timezone will provide the questioner's "12 hour time? – waltinator Aug 20 '15 at 21:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.