date command is used to display the system date and time. date command is also used to set date and time of the system.
1. date (no option)
With no options, the date command displays the current date and time, including the abbreviated day name, abbreviated month name, day of the month, the time separated by colons, the time zone name, and the year.
$ date
Example:

2. -u Option
Displays the time in GMT(Greenwich Mean Time)/UTC(Coordinated Universal Time )time zone.
$ date -u
Example:

3. Using –date option for displaying past dates:
the below command used for to display the past dates like yesterday, 2 weeks ago, 3 months ago date.
$ date –date=”yesterday”
$ date –date=”2 year ago”
Example:

4. Using –date option for displaying future date:
It displays Date and time of upcoming particular week day.
$ date –date=”next mon”
$ date –date=”10 day”
Example:

5. -s or –set Option:
To set the system date and time -s or –set option is used.
$ date –set=”set the date”
Example:
