How can I change my terminal timestamp to military time?

0
5
Asked By SunnyBreeze99 On

Hey everyone, I'm looking to change the timestamp in my terminal to display military time. For example, I want it to show as [2054]-[jag@mo] instead of [08:54 PM]-[jag@Mo]. Any tips on how to make this happen?

2 Answers

Answered By CodeMasterX On

To change it manually, you can edit your .bashrc file. Try adding PS1='[t] [jag@mo]' or use '[A]' for the prompt. That should set it to military time.

Answered By TechGuru01 On

You might want to check your locale settings and switch to one that uses the 24-hour format. That could help with getting your terminal to display the desired time format.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.