cmdxray / commands / date

What does date do?

print or set the system date and time.

▸ Explain your own date command →

date examples, explained

$ date -u

  • dateprint or set the system date and time
  • -uuse UTC instead of local time

$ date -d "next friday"

  • dateprint or set the system date and time
  • -dprint the given date string instead of the current time
  • next fridayvalue for -d

date flags & options

-uuse UTC instead of local time
-dprint the given date string instead of the current time
-sset the system clock to the given time
-rshow the last-modified time of the given file
-Ioutput in ISO 8601 format
-Routput in RFC 5322 format (for email headers)

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.