Digital Clock Settings


4 posts
by nounoua » Sat Jan 12, 2013 1:23 am
Hi all,

I've had my Pi for four weeks now, but I haven't been able to properly change the settings of the digital clock in the menu bar/panel. I can open the settings window, but then in the text edit lines to change the settings I get some codes which I don't know what stand for. If I use '%A' I get the date, and '%R' gets me the time in 24 hr format. Is there a way to display both the date, and time in 12-hour format?
Posts: 7
Joined: Sat Dec 29, 2012 5:59 am
by mikef » Mon Jan 21, 2013 4:00 am
Notice in the Digital Clock settings dialog it says: Format codes: man 3 strftime |n for line break

Which means you can find the formatting codes with the man utility. Type: man 3 strftime

This will run the man (manual) utility that display the instructions for the strftime command (format date and time). You can use the same formatting characters in the Clock Format and Tooltip Format input boxes to specify how you want the date and/or time to appear. You can use %n to add a line break to format date/time over more than one line.
Posts: 1
Joined: Mon Jan 21, 2013 2:37 am
by swerve151 » Wed Feb 20, 2013 3:18 am
@Nounoua

%r will give you a 12 hour clock with am/pm indicator
%R will give you a 24 hour clock
%X will give you a 24 hour clock with seconds
%x will give you the date in this format DD/MM/YY
%d will give you the day in number format
%D will give you the date in this format MM/DD/YY
%a will give you the abbreviated day name
%A will give you the full day name
Posts: 1
Joined: Wed Feb 20, 2013 3:08 am
by aberts10 » Sun Jul 27, 2014 3:27 am
i did a 12 hour clock format with this....

%I:%M %p

just set your timezone in raspi with "sudo raspi-config",
then right click the clock and paste it in.
Posts: 2
Joined: Mon Mar 31, 2014 1:57 am