LinuxCommandLibrary

idevicedate

Set date and time on iOS devices

TLDR

Display the current date and time

$ idevicedate
copy

Set the date and time on the device to the system time
$ idevicedate --sync
copy

Set the date and time to a specific timestamp
$ idevicedate --set [timestamp]
copy

SYNOPSIS

idevicedate [-u UDID] [-d] [-h] [-V] [YYYY-MM-DDThh:mm:ss]

PARAMETERS

-u, --udid UDID
    Target specific device by UDID (partial match allowed)

-d, --debug
    Enable debug logging for communication

-h, --help
    Display usage help

-V, --version
    Print version information

[date]
    ISO 8601 date/time to set (YYYY-MM-DDThh:mm:ss); omit to retrieve

DESCRIPTION

idevicedate is a command-line tool from the libimobiledevice suite, enabling users to retrieve or synchronize the date and time on connected iOS devices (iPhone, iPad, iPod Touch) via USB. It communicates through the device's lockdown service after establishing a usbmuxd connection, making it invaluable for scenarios where the device lacks network access for automatic time updates, such as in air-gapped environments, forensic analysis, or troubleshooting clock drift issues.

To use, connect the device via USB (it must be unlocked and trusted to the host computer). Running idevicedate without arguments displays the current device time in ISO 8601 format (YYYY-MM-DDThh:mm:ss). Providing a date argument sets the device's clock accordingly. This affects apps, logs, and filesystem timestamps but does not adjust timezone settings—use the device's UI for that.

Installation on Debian/Ubuntu: sudo apt install libimobiledevice-utils. Requires libusbmuxd for multiplexing. Supports multiple devices with UDID targeting. Debug mode aids troubleshooting connection issues. Note: Changes persist until battery drain or next sync/reset.

CAVEATS

Device must trust host and be unlocked. No timezone support—sets raw time. Requires USB; wireless limited. Fails if services unavailable post-jailbreak.

EXAMPLE USAGE

idevicedate # Get current time
idevicedate '2024-01-15T14:30:00' # Set time
idevicedate -u 00008030-001234... -d '2024-01-15T14:30:00'

DEPENDENCIES

libimobiledevice (≥1.3), libusbmuxd (≥2.0), libplist. Build from source: ./autogen.sh && make && sudo make install

HISTORY

Developed as part of libimobiledevice project by Nikias Bassen starting 2007 for open-source iOS tooling post-iPhone launch. idevicedate added early (~2008) for basic diagnostics. Actively maintained; latest in v1.3.5+ supports iOS 17.

SEE ALSO

Copied to clipboard