bug-coreutils
[Top][All Lists]
Advanced

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

Re: date broken in coreutils-6.7 and new glibc-2.7


From: Philip Rowlands
Subject: Re: date broken in coreutils-6.7 and new glibc-2.7
Date: Fri, 9 Nov 2007 19:16:52 +0000 (GMT)

On Wed, 7 Nov 2007, Clemens Koller wrote:

I have a problem setting the system date together with the time with date -s. This happens since I migrated my embedded powerpc system to the latest glibc-2.7. glibc-2.3.4 was working fine with same kernel. Since I did a full toolchain bootstrap while upgrading glibc, lots of stuff has changed.

Conclusion:
1) date -s can only set either the date or the time, but it's clearing the time or the date, then.

2) date -s cannot set both: date und time at once. -> resets to
Thu Jan  1 01:00:00 CET 1970

There's nothing special about setting "date only" from the system call's point of view - it's just a number of seconds (and microseconds).

address@hidden:~$ date
Thu Jan  1 01:00:00 CET 1970

address@hidden:~$ date -s 20071107
Wed Nov  7 00:00:00 CET 2007

address@hidden:~$ date -s 12:01
Thu Jan  1 12:01:00 CET 1970
[snip repeats]

The rest of the examples show date working correctly, so let's focus on the above problem.

date doesn't re-read the clock after it's been set, so you should be able to produce the error with just a query:

$ date -d '12:01'

Does this return today's date or Jan 1 1970? It would be useful to see the system calls with strace; could you run the mis-firing command and copy the system calls?


Cheers,
Phil




reply via email to

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