zdump
Dump time zone information
TLDR
Print the current time in a timezone
Display help
SYNOPSIS
zdump [OPTION ...] [ZONENAME ...]
zdump [OPTION ...] --input-file=FILE
PARAMETERS
ZONENAME ...
One or more time zone names (e.g., "America/New_York", "Europe/London") for which to display information. These names correspond to files within the system's time zone database.
-v, --verbose
Dumps extensive time zone information, including the time at the lowest and highest possible values and all time transitions (e.g., daylight saving time changes) from 1970 up to the present and into the future.
-c YEAR, --until-year=YEAR
Limits the dumped information to transitions occurring up to the specified year (inclusive). This helps to narrow down the output for verbose queries.
-t TIMESTAMP, --timestamp=TIMESTAMP
Dumps information only at the given Unix epoch timestamp. This is useful for checking the time zone behavior at a specific point in time.
-i FILE, --input-file=FILE
Reads a list of time zone names to process from the specified file, one name per line. This is convenient for processing multiple zones without listing them on the command line.
--version
Outputs version information about zdump and exits.
--help
Displays a help message with usage instructions and available options, then exits.
DESCRIPTION
zdump is a utility for displaying detailed time zone information. It can show the current time in specified time zones, along with crucial details like the time at the lowest and highest possible timestamp values, and all past and future time transitions. This is particularly useful for understanding how a time zone behaves over time, including changes due to daylight saving time (DST) or historical time zone rule alterations. It queries the system's time zone database (typically /usr/share/zoneinfo) to provide accurate and comprehensive output, making it an invaluable tool for system administrators and developers dealing with time-sensitive applications and data.
CAVEATS
zdump's accuracy is entirely dependent on the currency and integrity of the system's installed time zone database (typically the IANA Time Zone Database). If this database is outdated, the output for future or even past transitions may be incorrect. The verbose output (with -v) can be very extensive for time zones with numerous historical changes. Note that zdump does not perform time zone conversion itself; it reports on the properties and transitions of time zone definitions.
OUTPUT DETAILS
When run without the -v (verbose) option, zdump typically shows the current time in the specified time zone. With -v, it outputs a detailed list of time transitions, including the Unix epoch timestamp, the local time before and after the transition, the corresponding time zone abbreviation, and the daylight saving time (DST) status. This verbose output is crucial for understanding historical and future time adjustments for a given zone.
TIME ZONE DATABASE
zdump relies on the system's time zone information files, typically located under /usr/share/zoneinfo. These files constitute the IANA Time Zone Database (also known as the Olson database), which is a collaborative compilation of worldwide time zone changes and rules. Keeping this database up-to-date is essential for zdump to provide accurate and current information.
HISTORY
zdump is an integral part of the tzdata (Time Zone Database) package, widely known as the IANA Time Zone Database or Olson database. It has been a standard utility for inspecting time zone data on Unix-like systems for decades. Its fundamental role has remained consistent: to provide a programmatic way to examine the behavior of defined time zones over historical and future periods, evolving alongside updates to the authoritative time zone data itself.