bug#40220: date command set linux epoch time failed

2020-03-30 Thread Paul Eggert
On 3/29/20 9:32 PM, Bob Proulx wrote: Both calls from GNU date are returning EINVAL. Those are Linux kernel system calls. Those Linux kernel system calls are using CLOCK_MONOTONIC. OK, I think I understand now. For some reason Linux prohibits you from setting CLOCK_REALTIME to a value less

bug#40220: date command set linux epoch time failed

2020-03-29 Thread Bob Proulx
Paul Eggert wrote: > Bob Proulx wrote: > > By reading the documentation for CLOCK_MONOTONIC in clock_gettime(2): > > GNU 'date' doesn't use CLOCK_MONOTONIC, so why is CLOCK_MONOTONIC relevant > to this bug report? GNU date uses clock_settime() and settimeofday() on my Debian system. Let me

bug#40220: date command set linux epoch time failed

2020-03-29 Thread Paul Eggert
On 3/28/20 9:12 AM, Bob Proulx wrote: By reading the documentation for CLOCK_MONOTONIC in clock_gettime(2): GNU 'date' doesn't use CLOCK_MONOTONIC, so why is CLOCK_MONOTONIC relevant to this bug report? Is this some busybox thing? If so, user 'shy' needs to report it to the busybox people,

bug#40220: date command set linux epoch time failed

2020-03-29 Thread Bob Proulx
Paul Eggert wrote: > Bob Proulx wrote: > > I tested this in a victim system and if I was very quick I was able to > > log in and set the time to :10 seconds but no earlier. > > Sounds like some sort of atomic-time thing, since UTC and TAI differed by 10 > seconds when they started up in 1972.

bug#40220: date command set linux epoch time failed

2020-03-28 Thread Paul Eggert
On 3/27/20 11:52 PM, Bob Proulx wrote: I tested this in a victim system and if I was very quick I was able to log in and set the time to :10 seconds but no earlier. Sounds like some sort of atomic-time thing, since UTC and TAI differed by 10 seconds when they started up in 1972. Perhaps the

bug#40220: date command set linux epoch time failed

2020-03-28 Thread Bob Proulx
tag 40220 + notabug close 40220 thanks shy wrote: > I use command date -s "1970-01-20 00:00:00" to set date, but it > failed. there is error message "date: can't set date: Invalid > argument". > It's UTC time and no timezone. This is most likely a limitation of your kernel. I can

bug#40220: date command set linux epoch time failed

2020-03-24 Thread shy
Hi all: I use command date -s "1970-01-20 00:00:00" to set date, but it failed. there is error message "date: can't set date: Invalid argument". It's UTC time and no timezone. I test with stime or settimeofday to set seconds 0, they are all have the problem. 1. I use