By default, Raspbian displays a 24-hour clock:
Normally, LXDE provides an option to change the clock format by opening Panel Preferences, selecting "Digital Clock", and clicking Preferences. However, this is disabled:
How do I change the format?
By default, Raspbian displays a 24-hour clock:
Normally, LXDE provides an option to change the clock format by opening Panel Preferences, selecting "Digital Clock", and clicking Preferences. However, this is disabled:
How do I change the format?
First, the rationale for this:
"And with regards the clock plug-in – yes, I’ve disabled the config for the time being. The clock plug-in was a nightmare from a UI point of view. For example – popping up the calendar gives you a calendar window in which you can move a highlight to show a different day – for no purpose at all. It contained a lot of kludgey hacked code for the benefit of someone who wanted the option to have their clock in bold font."
Now for the fix. Open a terminal and run:
leafpad /home/pi/.config/lxpanel/LXDE-pi/panels/panel
(Substitute leafpad
with a console editor such as vi
or nano
if desired.)
Locate the following line:
ClockFmt=%R
...and change it to:
ClockFmt=%r
Save the file and either reboot or restart LXDE.
Changing the format of the time using either Ken's or Nathan's way works, but there is another difference between %R
and %r
. %r
also shows the seconds ticking off. If you want them, great. If not, then you need to specify a different format, like %I:%M %p
.
For a full list of formatting codes, see Customizing The Clock (from archive.org)
%I:%M %p
insteadThe seconds from %r
are annoying and useless.
On Pi 2, I have found right clicking on the clock, click digital clock settings, on clock format, change %R to %r