Uptime format

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Is there any setting I missed that switches from 12 to 24 hours time format?
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Not that I can see. What are you looking to accomplish?
I think an alternative would be to strip the first field from the output uptime | cut -wf2- and then prepend the date in the format that you want it date +%H:%M:%S and put it all together using 'echo':
echo $(date +%H:%M:%S) $(uptime | cut -wf2-)
or
echo $(date +%H:%M:%S ; uptime | cut -wf2-)
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
I live in europe and I don't like the AM/PM.
Considering you can set time zone, it would make perfect sense to uptime (and maybe some other times across the system if it's not the only place) to be shown in format relevant to selected region.
 
Top