bug-coreutils
[Top][All Lists]
Advanced

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

Re: Bug in date?


From: James Youngman
Subject: Re: Bug in date?
Date: Tue, 9 Sep 2008 19:52:53 +0100

On Tue, Sep 9, 2008 at 1:47 PM, Enrique Arizón Benito
<address@hidden> wrote:

> Upps, I forgot it.
>
>  #date -s "1970-01-01 00:00:01"
>  date: cannot set date: Invalid argument

It looks like date is simply reporting an error that it received from
the operating system.   The strace utility (or some platform-specific
replacement if you are not using Linux) should be able to confirm
this.

>  Thu Jan 1 00:00:01 CET 1970
>
> Curiosly after the Invalid argument error, date properly prints the new hour
> but doesn't change it.

This is almost certainly because the date program understands the date
you refer to, but failed in its attempt to set the system clock to
that value.

> That's what makes me think it's really a bug.

More likely it's because CET is 1h ahead of UTC and therefore the time
you specified is before the Epoch.    But Eric already said that, so
perhaps you ruled out that possibility but did not say so.

James




reply via email to

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