… has too many hobbies.

pdate: Date/Time Parsing for Programmers, DevOps, and SRE

Software developers encounter a lot of timestamps. These timestamps vary in format and human-readability — some might follow RFC3339, while others might be Unix timestamps (in seconds, nanoseconds, or something else) or embedded within ULIDs.

In my experience, particularly during an incident, it's valuable to be able to quickly parse timestamps in disparate formats and answer three questions:

  1. When was this in UTC?
  2. When was this relative to now?
  3. When was this in my local time zone?

pdate answers these questions.

GitHub - cdzombak/pdate: Date/time parsing on the CLI
Date/time parsing on the CLI. Contribute to cdzombak/pdate development by creating an account on GitHub.

Given a date, pdate attempts to detect its format and parse it, and it answers those three questions:

It also provides the date in a few common representations that you may need to copy into another tool or into a report.

pdate is freely available and easy to install on macOS and Linux; see the README for details.