Re: Output from date command defaults to 12-hour in Buster.
Greg Wooledge <wooledg@eeg.ccf.org> writes:
> On Tue, Apr 28, 2020 at 10:53:25PM -0600, Charles Curley wrote:
> > Adding
> >
> > alias date='date +"%a %b %d %T %Z %Y"'
> >
> > to one's .bashrc or /etc/bashrc should get the OP what he wants.
It did make just the date command work as desired. I
actually tried that very thing maybe a year or so ago
and it worked, sort of.
Greg Wooledge continues:
> No, this is not a viable solution. It will completely hinder your
> ability to use date with other format arguments, and it will not
> address the underlying problem, which is in the locale definition used
> by strftime(3) and similar pieces of libc. (There are other programs
> that are affected by this, not just date(1).)
>
> Setting LC_TIME=C is a much better answer.
I do appreciate the help. I remember setting up the
alias, cheering when the date command worked, and then about 10
or 15 seconds later, swearing when something else, I forget what,
filled the screen with a cacophony of error messages and I
immediately realized why and put things back the way they had
been.
Martin
Reply to: