hp-timedate
Configure the printer's date and time
SYNOPSIS
hp-timedate [-h|--help] [-v|--version] [-d|--device=<device_uri>] [-g|--get | -s|--set] [-i|--interactive]
PARAMETERS
-h, --help
Displays a brief help message and exits.
-v, --version
Shows the HPLIP version information and exits.
-d <device_uri>, --device=<device_uri>
Specifies the device URI for the HP device to operate on. If omitted, the command attempts to autodetect an available HP device. Example URI: hp:/usb/DeskJet_2600_series?serial=ABC123DEF.
-g, --get
Retrieves and displays the current time and date from the specified HP device.
-s, --set
Sets the time and date of the specified HP device to match the current system time. This operation typically requires root privileges.
-i, --interactive
Runs the command in interactive mode, prompting the user for choices and confirmations during the operation.
DESCRIPTION
hp-timedate is a utility provided by the HPLIP (HP Linux Imaging and Printing) driver project, designed specifically to manage the time and date settings of connected HP peripherals, primarily printers. Unlike standard Linux commands such as date or timedatectl which control the system's clock, hp-timedate focuses on synchronizing or setting the internal clock of your HP hardware.
This command is essential for maintaining accurate timestamps on printouts, device logs, and for networked HP devices that rely on correct time synchronization for network services and security protocols. It allows users to query the device's current time and date (--get option) or set the device's time to match the host system's current time (--set option). Interaction with the HP device is facilitated by the HPLIP backend. For certain operations, particularly setting the device time, administrative privileges (e.g., using sudo) are typically required to ensure proper device access and modification. It ensures consistency between your Linux system and your HP equipment.
CAVEATS
Requires the hplip package to be installed on your Linux system.
Setting the device time usually requires root privileges or proper udev rules configured for device access.
This command is exclusively designed for managing HP devices and will not interact with non-HP hardware or the system's clock directly.
The target HP device must be connected, powered on, and accessible by the system for the command to function correctly.
USAGE EXAMPLES
Get Device Time:
To retrieve the current time from your HP device:
hp-timedate -g -d hp:/usb/HP_LaserJet_MFP_M232-M237
If only one HP device is connected and detected, you can often omit the device URI:
hp-timedate -g
Set Device Time:
To synchronize your HP device's time with your system's current time, which often requires administrative privileges:
sudo hp-timedate -s -d hp:/net/HP_LaserJet_MFP_M232-M237
Or, for an autodetected device:
sudo hp-timedate -s
The command will confirm the operation and update the device's internal clock.
HISTORY
The hp-timedate utility is an integral part of the HPLIP (HP Linux Imaging and Printing) project, which was initiated by HP and the open-source community around 2001. HPLIP was developed to provide comprehensive, unified support for HP printers, scanners, and multi-function devices across various Linux distributions. As HP devices evolved to include embedded clocks for logging, network synchronization, and timestamping functionalities, the need for a dedicated tool to manage these internal time settings arose. hp-timedate was thus introduced as part of this suite to specifically address device-side time management, ensuring consistency and accuracy between the Linux host and its connected HP peripherals. Its core functionality has remained focused on this specific task since its inception, reflecting the ongoing requirement for precise device clock synchronization.
SEE ALSO
date(1), timedatectl(1), hp-setup(1), hp-info(1)