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

muru
  • 197,895
  • 55
  • 485
  • 740

1 Answers1

-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.

roadmr
  • 34,222
  • 9
  • 81
  • 93