Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #222090

Re: Output from date command defaults to 12-hour in Buster.

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups linux.debian.user
Subject Re: Output from date command defaults to 12-hour in Buster.
Date 2020-04-29 16:30 +0200
Message-ID <A0VSN-1Qw-5@gated-at.bofh.it> (permalink)
References <A0JRD-2s2-3@gated-at.bofh.it> <A0K1k-2ww-5@gated-at.bofh.it> <A0MZe-4ti-9@gated-at.bofh.it> <A0TnX-aJ-1@gated-at.bofh.it> <A0VpM-1qR-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Apr 29, 2020 at 08:56:24AM -0500, Martin McCormick wrote:
> 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.

It breaks if you try to use your own "plus" argument.

unicorn:~$ alias date='date +"%a %b %d %T %Z %Y"'
unicorn:~$ date +%s
date: extra operand ‘+%s’
Try 'date --help' for more information.
unicorn:~$ unalias date
unicorn:~$ date +%s
1588170499

If you mean "It worked when I ran date with no arguments", then sure,
it will "work" for that one sample case.  But it breaks in many other
cases.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Output from date command defaults to 12-hour in Buster. "Martin McCormick" <martin.m@suddenlink.net> - 2020-04-29 03:40 +0200
  Re: Output from date command defaults to 12-hour in Buster. Roberto C. Sánchez <roberto@debian.org> - 2020-04-29 03:50 +0200
    Re: Output from date command defaults to 12-hour in Buster. Charles Curley <charlescurley@charlescurley.com> - 2020-04-29 07:00 +0200
      Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-29 13:50 +0200
        Re: Output from date command defaults to 12-hour in Buster. Nicolas George <george@nsup.org> - 2020-04-29 14:10 +0200
          Re: Output from date command defaults to 12-hour in Buster. Andrei POPESCU <andreimpopescu@gmail.com> - 2020-04-29 19:10 +0200
            Re: Output from date command defaults to 12-hour in Buster. Nicolas George <george@nsup.org> - 2020-04-29 19:20 +0200
              Re: Output from date command defaults to 12-hour in Buster. Andrei POPESCU <andreimpopescu@gmail.com> - 2020-04-30 10:30 +0200
                Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-30 13:20 +0200
                Re: Output from date command defaults to 12-hour in Buster. Nicolas George <george@nsup.org> - 2020-04-30 17:10 +0200
        Re: Output from date command defaults to 12-hour in Buster. "Martin McCormick" <martin.m@suddenlink.net> - 2020-04-29 16:00 +0200
          Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-29 16:30 +0200
            Re: Output from date command defaults to 12-hour in Buster. l0f4r0@tuta.io - 2020-04-29 18:20 +0200
  Re: Output from date command defaults to 12-hour in Buster. Reco <recoverym4n@enotuniq.net> - 2020-04-29 08:20 +0200
    Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-29 14:10 +0200
      Re: Output from date command defaults to 12-hour in Buster. Nicolas George <george@nsup.org> - 2020-04-29 14:20 +0200
    Re: Output from date command defaults to 12-hour in Buster. Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-29 15:10 +0200
      Re: Output from date command defaults to 12-hour in Buster. "Martin McCormick" <martin.m@suddenlink.net> - 2020-04-29 18:30 +0200
    Re: Output from date command defaults to 12-hour in Buster. "Martin McCormick" <martin.m@suddenlink.net> - 2020-04-29 15:10 +0200
  Re: Output from date command defaults to 12-hour in Buster. James Cloos <cloos@jhcloos.com> - 2020-05-01 18:30 +0200

csiph-web