idevicedate
Set date and time on iOS devices
TLDR
Display the current date and time
Set the date and time on the device to the system time
Set the date and time to a specific timestamp
SYNOPSIS
idevicedate [OPTIONS] [DATE_STRING]
PARAMETERS
-u, --udid
Target a specific device by its 40-character UDID. If not specified, the command will operate on the first detected device.
-s, --set
Set the device's date and time to the specified
-t, --time
Print the device's current date and time as a Unix timestamp (seconds since epoch).
-d, --debug
Enable debug output for verbose information about the command's execution and communication with the device.
-h, --help
Display usage information and exit.
-v, --version
Display version information and exit.
DESCRIPTION
The idevicedate command is a command-line utility from the libimobiledevice suite. It allows users to query and modify the system date and time of an Apple iOS device (iPhone, iPad, iPod Touch) connected via USB. This tool is particularly useful for synchronization purposes, debugging, or when an iOS device's time needs to be adjusted without direct interaction with the device's settings menu. It communicates with the device using open-source implementations of Apple's private protocols, providing a convenient way to manage device time directly from a Linux or macOS system.
CAVEATS
The iOS device must be connected via USB and trusted by the host computer (pairing must be completed).
Setting the date requires the device to be unlocked or in a state where it can accept date modifications.
Time synchronization might be automatically handled by the iOS device itself via network time protocols (NTP), potentially overriding manually set times.
Ensure the correct time zone is considered when setting a date, as the device might interpret the Z (Zulu/UTC) suffix differently based on its own timezone settings.
Some iOS versions or security settings might restrict date manipulation.
DATE STRING FORMAT FOR SETTING
When using the -s or --set option, the
YYYY: Four-digit year (e.g., 2023)
MM: Two-digit month (01-12)
DD: Two-digit day (01-31)
T: Separator indicating the start of the time component
HH: Two-digit hour (00-23)
MM: Two-digit minute (00-59)
SS: Two-digit second (00-59)
Z: Indicates UTC (Coordinated Universal Time). If your input is not UTC, you might need to convert it first or rely on the device's interpretation.
Example: To set the device's time to October 27, 2023, at 10:30:00 AM UTC, you would use: idevicedate --set 2023-10-27T10:30:00Z.
PREREQUISITES
To use idevicedate, you must have the libimobiledevice suite installed on your Linux or macOS system. This typically involves installing a package like libimobiledevice-utils or a similar name depending on your distribution.
HISTORY
idevicedate is part of the libimobiledevice project, an open-source initiative that began around 2007. This project aims to provide a cross-platform protocol library to communicate with Apple's iOS devices natively. It was developed through reverse-engineering Apple's proprietary protocols, enabling Linux and other non-Apple operating systems to interact with iPhones, iPads, and iPod Touches. idevicedate emerged as one of the many specialized utilities within this suite, offering granular control over device settings like time, which was previously only possible via iTunes or direct device interaction.
SEE ALSO
ideviceinfo(1), ideviceinstaller(1), idevicebackup2(1), idevice_id(1), date(1)