Hey everyone! I'm trying to modify the timestamp in my terminal to display in military time format. For example, instead of seeing something like [08:54 PM]-[jag@Mo], I want it to look like [2054]-[jag@mo]. Any suggestions on how to achieve this?
2 Answers
One way to get this done is by changing your locale to one that uses a 24-hour format. It might help align your terminal’s time display with what you're looking for.
You could try editing your .bashrc file. Just add something like ps1='[t] [jag@mo]' to set the format you want. It should work to show the time in military format.
I gave that a shot, but unfortunately, it didn’t work for me.

Are you talking about the local system settings? Because mine already uses military time, but the terminal doesn’t reflect that.