Command: date
Print the system date and time.
date
date -u
date '+%Y-%m-%d %H:%M:%S %Z'
Use it when you need the machine’s idea of now. Use date -u when you need UTC.
How To Read It
The output includes a date, time, and timezone abbreviation. Logs, HTTP headers, cron, systemd timers, and git commits can use different timezone assumptions. For this course, course dates are local to Asia/Singapore.
Common Failures
- Time looks wrong: compare
dateanddate -ubefore assuming the server clock is wrong. - Scheduled work ran at a surprising time: check the timezone used by cron or systemd.
- HTTP
Dateheader differs from local time: HTTP dates are commonly GMT.
Docs Pointers
- Run
man date, then read-uand format examples. - Read Time Zones.

Linux Foundations