date
Name
date - display or set date and time
Examples
Print Formatted Date/Time
Date/Time with time zone offset (format:
+hhmm):date +%Y-%m-%d'T'%H:%M:%s%z 2022-07-22T10:51:14+0200or shorter
date +%F'T'%T%z 2022-07-22T10:51:14+0200Date/Time with time zone offset (format
+hh:mm):- On macOS
TZ=Europe/Berlin date -Iseconds -r $(date +%s) 2022-07-22T10:33:40+02:00 - On Linux
date +%F'T'%T%:z 2022-07-22T10:33:40+02:00
- On macOS