Standard rather than Military time

Message
Author
Spaceman Spiff
Posts: 6
Joined: Sat Mar 17, 2018 12:01 am

Standard rather than Military time

#1 Post by Spaceman Spiff »

I have %R on my clock and it displays 18:56 PM, but I want it to say 6:56 PM. I looked online and there was not any obvious solution. Maybe I'm just blind. :p
Could someone help please?

User avatar
kmathern
Developer
Posts: 2409
Joined: Wed Jul 12, 2006 2:26 pm

Re: Standard rather than Military time

#2 Post by kmathern »

try

Code: Select all

 %l:%M %p

For other options check the date manpage.
Last edited by kmathern on Thu May 02, 2019 9:13 pm, edited 1 time in total.

User avatar
Adrian
Developer
Posts: 8270
Joined: Wed Jul 12, 2006 1:42 am

Re: Standard rather than Military time

#3 Post by Adrian »

That's one of the first things I change, I use

Code: Select all

%I:%M%p
You can add a blank space before %p if you want a space, I also use horizontal panel so it doesn't run out of space...

Edit: ninja'd by kmathern

User avatar
gimcrack
Posts: 251
Joined: Fri Dec 02, 2011 6:17 pm

Re: Standard rather than Military time

#4 Post by gimcrack »

%I:%M

If you don't want seconds.

http://i.imgur.com/OCPWLZk.png

User avatar
tascoast
Posts: 441
Joined: Sat Aug 06, 2011 4:58 am

Re: Standard rather than Military time

#5 Post by tascoast »

%P will give you am/pm indicators in lower case.

For me (using clock) I just append this to what is already there, having checked 12-hour format during installation I believe:

%I:%M%P
Inspiron 15 5000-5593- (i7-1065G7) MX 23..2 AHS/MX-21//W10 - Lenovo ThinkCentre A58 4GBRAM (64-bit), MX-23.2/MX21.3./antiX 23/Mint 21.3, Ubuntu 22.04.4, openSUSE Tumbleweed,

Spaceman Spiff
Posts: 6
Joined: Sat Mar 17, 2018 12:01 am

Re: Standard rather than Military time

#6 Post by Spaceman Spiff »

Thanks guys. did the trick. You're da best. :number1:

User avatar
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: Standard rather than Military time

#7 Post by Head_on_a_Stick »

Spaceman Spiff wrote: Thu May 02, 2019 8:59 pm it displays 18:56 PM
Is that a bug?

24-hour clocks shouldn't have AM/PM.
mod note: Signature removed, please read the forum rules

User avatar
chrispop99
Global Moderator
Posts: 3180
Joined: Tue Jan 27, 2009 3:07 pm

Re: Standard rather than Military time

#8 Post by chrispop99 »

Head_on_a_Stick wrote: Fri May 03, 2019 1:52 am
Spaceman Spiff wrote: Thu May 02, 2019 8:59 pm it displays 18:56 PM
Is that a bug?

24-hour clocks shouldn't have AM/PM.
As released, it doesn't display am/pm with locale as UK. The strftime function used is %H:%M. Incidentally, %R, which is what the OP says he had, doesn't display am/pm either.

Perhaps controversially, an argument could be made for 24h display being the default, in view of the number of global users.

Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

User avatar
Richard
Posts: 1577
Joined: Fri Dec 12, 2008 10:31 am

Re: Standard rather than Military time

#9 Post by Richard »

The best thing about 24 hour time, IMHO,
is how logically it sorts.

https://www.google.com/url?q=https://en ... gD94xl_vj6
A limited number of countries, particularly English-speaking, use the 12-hour clock, or a mixture of the 24- and 12-hour time systems. In countries where the 12-hour clock is still dominant, some professions prefer to use the 24-hour clock. For example, in the practice of medicine the 24-hour clock is generally used in documentation of care as it prevents any ambiguity as to when events occurred in a patient's medical history.[3] In the United States and a handful of other countries, it is popularly referred to as military time.[1][4]
Last edited by Richard on Fri May 03, 2019 6:22 am, edited 1 time in total.
Thinkpad T430 & Dell Latitude E7450, both with MX-21.3.1
kernal 5.10.0-26-amd64 x86_64; Xfce-4.18.0; 8 GB RAM
Intel Core i5-3380M, Graphics, Audio, Video; & SSDs.

User avatar
cyrilus31
Posts: 629
Joined: Thu Nov 03, 2016 3:24 pm

Re: Standard rather than Military time

#10 Post by cyrilus31 »

Richard wrote: Fri May 03, 2019 5:59 amIn the United States and a handful of other countries, it is popularly referred to as military time.[1][4]
I've learned something today. Thanks

Post Reply

Return to “XFCE Desktop Environment”