Home > Missing Answers > How to change sar output time format to 24 (solution)

How to change sar output time format to 24 (solution)

I always forget how to change this and Google is not giving the right answer anywhere among top results, so here just for my record:
# Put into your .bashrc
export LC_TIME="POSIX"

# Or use just when needed
LC_TIME="POSIX" sar

sar is a command from systat package. It provides output in AM/PM format by default. Setting the locale LC_TIME to POSIX changes the time format to 24.

Categories: Missing Answers Tags: