How TO = Change Clock Format 12/24H for LXDE

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
Jay514

How TO = Change Clock Format 12/24H for LXDE

Post by Jay514 »

Here is how to change your clock setting between 12H / 24H Format
I searched all the forums & LXDE forums & could not find anything on the clock settings, so I kept working with it till I figured it out. :wink:
Basically right click the clock & click on settings.
You will see the clock format box with %R for 24H format. Change it to %X for 12H format.
Also you can try different combos if you want to display the day ,month, ect.
Ex= %X %D gives you the date after the time.
Ex= %X %A gives you day of the week after time
The " Date Manual " explains the Letters "A-Z" & the corresponding results. Not all letters are assigned , space where necessary.
Hope this helps,
Jay514 :mrgreen:

EDIT = Credit for this find goes to user Mr_Shifty , Thanks :)
Here is how you can find the Manual that explains all of the settings, in LXDE just open the LX terminal & enter this code

Code: Select all

man date
If you cannot see all of the settings just scroll down, the complete manual for date time settings

You may view the more comprehensive manual if it is installed on the site(forums.Linuxmint.com) by opening a terminal & input =

Code: Select all

info coreutils 'date invocation'
Thanks To User = verbertus & Dev= Kendall, Also Knew of this on line manual =

Posix compliant clock formats.
Last edited by Jay514 on Mon Apr 16, 2012 8:31 pm, edited 2 times in total.
Reason: update
Aging Technogeek

Re: How TO = Change Clock Format 12/24H for LXDE

Post by Aging Technogeek »

Good tutorial. It proves you can figure out most things in Linux if you are willing to try
deadguy
Level 5
Level 5
Posts: 707
Joined: Wed Aug 15, 2007 9:41 pm
Location: Illinois USA

Re: How TO = Change Clock Format 12/24H for LXDE

Post by deadguy »

very handy!!

I had it as %r which also sets the clock to 12 hour format
but was not aware of %D or %A

thanks :D
Jay514

Re: How TO = Change Clock Format 12/24H for LXDE

Post by Jay514 »

Thanks Deadguy for the info, glad it helped.
& thanks Aging Technogeek for the kudos,
You know the only reason for the how to post was = You know when something on your desktop is really bothering you & you go search for help, then you find none & repeat the process, untill you get tired of it, so you just fix it yourself, or break it trying.
Well I was at the point I was going to remove the clock or fix it. So I did, & it was so easy, I said " I'll make a How To so that someone else does not have to pull their hair out trying to fix the clock, :lol:" So I did.
Jay514 8)
popmuzik

Re: How TO = Change Clock Format 12/24H for LXDE

Post by popmuzik »

01: Right click the clock and goto "Digital Clock Settings"
02: In the Clock Format section paste this: %A %x %X
03: Click close and your clock will look like this: Saturday 04/10/2010 06:37:24 PM

04: I LOVE Linux MINT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
mark9950
Level 2
Level 2
Posts: 94
Joined: Sat Feb 27, 2010 7:22 pm

Re: How TO = Change Clock Format 12/24H for LXDE

Post by mark9950 »

Hey that last one works great.
Jay514

Re: How TO = Change Clock Format 12/24H for LXDE

Post by Jay514 »

An important Edit to the OP, Added the Manual that I was originally looking for, Thanks to user Mr_Shifty :D
DrHu

Re: How TO = Change Clock Format 12/24H for LXDE

Post by DrHu »

I had a problem with mint 8, in which the year display was a two digit version, and came up as 10(I think, anyway it looked odd)

I wanted a 2010 year display, I asked a question about it on these forums, and while waiting I had noticed the line in the digital clock selection
Format codes: man 3 strftime; \n for line break, and I actually just type man strftime in a terminal and read the particulars, format codes
--so I could then use %Y (instead of the %y) which Mint 8 had used, and I saw 2010 as the year

Now with Lxde mint 9 RC, I see that year is removed, added it back using this format
  • %H:%M %Y
--there is a space character between %M and %Y, which allows spacing the year a little further away from the time part of the digital clock display.

Having read these posts, I relaigned the format to be closer to what I normally use for dates ( ddMmmyyyy, 04Jun2010)
--and use this selection %H:%M %e%b%Y, which looks fine to me, I can probably leave out the day name, but I haven't decided on that yet, it is always useful to have a quick glance that gives you as much information as you need..

Not a joke to say, I advise everyone to adopt such a readable format ddMmmyyyy instead of ##/##/#### (numbers only), and here I had thought HAL had provided the interpretation and the user didn't need to help the programmer by making his/her job as easy as possible
  • By getting the user used to only using numbers and then having to know is it day before month or month before day: from reading the date, you just don't know, and they call users Dumb ?
    --is it European or is it American, the burden is down to the user to remember!
For an exact match to my standard style, I now choose %d instead of %e, so I get the full 18:00 04Jun2010, good enough.
gychang

Re: How TO = Change Clock Format 12/24H for LXDE

Post by gychang »

I use %r - %a, and works well for me.

Anyone figure out how to make background black and foreground red?, just like LED?

thanks,

gychang
rich_roast

Re: How TO = Change Clock Format 12/24H for LXDE

Post by rich_roast »

All the lxpanel plugins honour the font colour setting picked in panel settings -> appearance. It's not ideal, but you can select red and hey presto, red clock font.
darthn8ers

Re: How TO = Change Clock Format 12/24H for LXDE

Post by darthn8ers »

This is what I use "%A-%b%d %l:%M"
It looks like this "Friday-Sep02 4:06"
About.com has a clock string format list with examples.
Coolx3ni

Re: How TO = Change Clock Format 12/24H for LXDE

Post by Coolx3ni »

Thank you. It works for linux mint 12 lxde
Jay514

Re: How TO = Change Clock Format 12/24H for LXDE

Post by Jay514 »

Good too see it is still working in LXDE :) Glad it helped you Coolx3ni. I done some edits to the OP so it reflects the manual more clearly now, Have a good one guys,
Jay :mrgreen:
Post Reply

Return to “Tutorials”