use SystemTime;
use ;
/// Return current Unix time in whole seconds.
/// Format Unix seconds `ts` as a human-readable local (this machine's timezone) timestamp,
/// e.g. `"2026-07-13 14:30:05 +0300"`. The offset is included since "local" is the *daemon
/// process's* timezone, which a remote reader can't otherwise infer.
pub
/// Whole seconds between the Unix epoch and `moment`.
///
/// A clock that reads before 1970 — as happens on a VM or container booted
/// with a dead real-time clock — would make `duration_since` return an error.
/// We clamp those to `0` rather than panicking so the daemon stays up until
/// the clock is corrected.