uutils/coreutils · error
setting date not implemented (unsupported target)
Error message
setting date not implemented (unsupported target)
What it means
Error "setting date not implemented (unsupported target)" thrown in uutils/coreutils.
Solutions
- Setting the system date is unsupported on this target; run on a supported platform or use the OS tools.
- Use date only for display on this platform, without the -s/--set option.
When it happens
Trigger: Occurs when date --set is used on a platform where setting the system clock is not implemented.
Common situations: Attempting `date -s` on an unsupported target platform lacking a set-time syscall binding.
AI-assisted analysis of uutils/coreutils@85295bbf78 (2026-08-19).
Data as JSON: /api/errors/4778b980263f6ce3.
Report an issue: GitHub.
Appendix: source
Thrown at src/uu/date/src/date.rs:1278
}
#[cfg(all(unix, not(target_os = "redox")))]
/// Returns the resolution of the system’s realtime clock.
///
/// # Panics
///
/// Panics if `clock_getres` fails. On a POSIX-compliant system this should not occur,
/// as `CLOCK_REALTIME` is required to be supported.
/// Failure would indicate a non-conforming or otherwise broken implementation.
fn get_clock_resolution() -> Timestamp {
use rustix::time::{ClockId, clock_getres};
let timespec = clock_getres(ClockId::Realtime);
#[allow(clippy::unnecessary_cast, reason = "needed for 32 bit target")]
Timestamp::constant(timespec.tv_sec as _, timespec.tv_nsec as _)
}
#[cfg(all(unix, target_os = "redox"))]
fn get_clock_resolution() -> Timestamp {
// Redox OS does not support the posix clock_getres function, however
// internally it uses a resolution of 1ns to represent timestamps.
// https://gitlab.redox-os.org/redox-os/kernel/-/blob/master/src/time.rs
Timestamp::constant(0, 1)
}
#[cfg(windows)]
fn get_clock_resolution() -> Timestamp {
// Windows does not expose a system call for getting the resolution of the
// clock, however the FILETIME struct returned by GetSystemTimeAsFileTime,
// and GetSystemTimePreciseAsFileTime has a resolution of 100ns.
// https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
Timestamp::constant(0, 100)
}
#[cfg(not(any(unix, windows)))]View on GitHub (pinned to 85295bbf78)