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).
[EMAIL PROTECTED]:~$ date
Thu Jan 1 01:00:00 CET 1970
[EMAIL PROTECTED]:~$ date -s 20071107
Wed Nov 7 00:00:00 CET 2007
[EMAIL PROTECTED]:~$ 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
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils