Skip to content

boxctl clock

Usage

boxctl-clock - Control fake hardware clock

    Usage:
      ${FRAMEWORK_SCRIPT_NAME:-${0}} [load|save] [-h|--help]

    Background
        Many embedded Linux systems do not have a functional hardware clock.
        Either they simply don't have a hardware clock at all
        or they have a hardware clock but it is not usable
        (e.g. because Linux doesn't know how to use it or because no battery is present).

        This can lead to time moving backwards
        to some default value (often 1970) when the system is rebooted.

        Since lots of software assumes that time only moves forward this is a bad thing.
        NTP can (and should where practical) be used to sync with an external timeserver
        but it is not available early in the boot process and may be unavailable for other reasons.

        The design expectation of boxctl clock
        is that it will be run very late at shutdowna and very early at boot.
        This will ensure that fsck has a vaguely sensible idea of system time
        at boot and won't complain that the last-modified time in the filesystem
        is not hugely in the past or future.

        Some users may not worry about this too use case,
        in which case it is possible to modify the init system configuration
        to move things earlier/later as appropriate.

    Example:
      ${FRAMEWORK_SCRIPT_NAME:-${0}} save
      ${FRAMEWORK_SCRIPT_NAME:-${0}} load

Library modules

Uses: clock