Quickly parse and reformat timestamps at the command line. 10.02.2026 | reading time: 2 min Turn timestamps into formats you can read and formats machines use by using the GNU date command; this short guide shows concrete commands that convert human readable times to epoch and back so you can script reliably. Try this example Run these commands on your system to see conversions live ```\ndate -d "2021-01-01 00:00:00" "+%s"\n# => 1609459200\n\ndate -u -d @1609459200 "+%Y-%m-%dT%H:%M:%SZ"\n# => 2021-01-01T00:00:00Z\n``` Options worth knowing Use `-d` to parse arbitrary date strings and `@SECONDS` to treat numbers as epoch seconds; use `-u` for UTC, `+FORMAT` with strftime tokens for custom output, `-r` or `--reference` to show a file mtime, `-Iseconds` or `-R` for standard stamped output and `--set` as root to change the system clock. Practical uses Convert log timestamps to epoch for fast comparisons, normalize dates across timezones in scripts by using `TZ=` or `-u`, embed formatted timestamps into filenames for backups and use date conversions when importing or exporting data between systems. What's next Mastering `date` removes a class of bugs and makes automation cleaner; keep practicing these commands and consider formal study if he wants certification such as CompTIA Linux+ or LPIC-1 with bitsandbytes.academy being an intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. utilities scripting troubleshooting