cinnamon-screensaver in 24H format?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Magister

cinnamon-screensaver in 24H format?

Post by Magister »

There is a big clock on the lock screen, it is in 12H format, I would like it in 24H. (I am using Mint16-32bits Cinnamon)

I am not sure how to do this, I took a quick look and it seems hardcoded in the source:

Code: Select all

time_value = g_strchug(g_date_time_format(now, _("%l:%M %p")));
Can this be change by a config file somewhere or am I stuck with 12/AM/PM thingy?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Magister

Re: cinnamon-screensaver in 24H format?

Post by Magister »

Not sure how, but changing LC_TIME can change it, however even if en_GB should be 24h, it is still 12h in the locale, why?
Using en_DK seems to only remove the AM/PM string but keep time in 12h, confused?
User avatar
karlchen
Level 23
Level 23
Posts: 18211
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: cinnamon-screensaver in 24H format?

Post by karlchen »

Hi, Magister.

To the best of my knowledge the date / time format of the Cinnamon screensaver directly depends on your regional settings.
Proceed like this:
+ Launch Cinnamon Control Center
+ Go to Regional settings
+ Go to the tab formats
+ Select your country
+ The right hand pane will display a preview of the number format and the date and time formats
+ If you like it , click [Close]
+ Remember to logoff and log back on in case you have changed the regional settings
+ Launch the screensaver by pressing <Ctrl><Alt>L (lower case L)

Kind regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
Magister

Re: cinnamon-screensaver in 24H format?

Post by Magister »

Thanks Karl, but in fact it is hard coded in the source, if I change the locale only the AM/PM dissapear, but the clock stay in 12h format. Seems it will be a feature for the future!
User avatar
karlchen
Level 23
Level 23
Posts: 18211
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: cinnamon-screensaver in 24H format?

Post by karlchen »

Hello, magister.
My Cinnamon screensaver has displayed the time in 24 hour notation ever since Cinnamon introduced its own screensaver in Cinnamon - 1.8.8, if I remember right. This corresponds to what I see in the Regional Settings.
Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
MikZ
Level 3
Level 3
Posts: 101
Joined: Sun Mar 17, 2013 7:08 pm
Contact:

Re: cinnamon-screensaver in 24H format?

Post by MikZ »

I'm using Cinnamon 2.6.13 in the en_AU locale, and it's a 24-hour clock. It should be a 12-hour clock.

The Screensaver → Date settings screen has a Time Format field, but there's no indication what the format characters mean. So far, websearching has taken me to an article that basically says 'woo woo, we can choose custom date formats now!', and this forum post.

Can anybody tell me:
  1. Which formatting scheme the time and date settings are based on (or, how to format a 12-hour clock, with an AM/PM indicator)?
  2. The best place to submit this l10n bug? (We don't use 24-hour clocks in Australian civil society—soooooo tired of it being assumed that we want UK standards, or worse yet, US standards! The UK and US are not two more Australian states, and I don't know of any annexation plans...)
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: cinnamon-screensaver in 24H format?

Post by Cosmo. »

You can look here or here for the codes.

BTW: If you open the settings for the calendar applet in Cinnamon and activate the option for a user-defined format you can use the link button, which leads to the second link I provided above.
MikZ
Level 3
Level 3
Posts: 101
Joined: Sun Mar 17, 2013 7:08 pm
Contact:

Re: cinnamon-screensaver in 24H format?

Post by MikZ »

Ah. 'strftime' was all I needed to know. Thank you. :-) The format

Code: Select all

%l:%H %p
produces what I want (that's a lower-case 'L'—the capital 'I' (for 'ice cream') also shows an hour out of 12, but with a leading zero).
jackerbes

Re: cinnamon-screensaver in 24H format?

Post by jackerbes »

I prefer the 24 hour time display for all purposes also.

I went to Systems Settings > Preferences > Date & Time and turned on the Use 24 Hour Clock setting to enable that. That put the 24 hour time in the panel.

I am using the default screen saver (a display of the time) which is set from Systems Settings > Preferences > Screen Saver and now I see the 24 hour time on the screen saver too.

Jack
Locked

Return to “Cinnamon”