bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11843: date -s vs encoding bug.


From: Bob Proulx
Subject: bug#11843: date -s vs encoding bug.
Date: Mon, 2 Jul 2012 13:31:18 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Jim Meyering wrote:
> Andreas Schwab wrote:
> > Jim Meyering writes:
> >> To get the behavior you want (a nominally no-op date-setting command),
> >> you should use this instead:
> >>
> >>     date -s "$(date '+%F %T.%N')"
> >
> > That fails to be a no-op during the ambigous end-of-dst period.  Better
> > use an unambigous format.
> >
> > # date -s @$(date +%s.%N)
> 
> Yep.  That is both shorter *and* better :-)
> Thanks.

I updated the 'date' FAQ section with an example of this type of usage.

  
http://www.gnu.org/software/coreutils/faq/#The-date-command-is-not-working-right_002e

Bob







reply via email to

[Prev in Thread] Current Thread [Next in Thread]