you can set date in linux system by using the date commad as follows

 date -s "15:41:00"

To display current date and time, enter:
To set the date and time, enter:
date 0217142590

For a system using CST as its time zone, this sets the date and time to Sat Feb 17 14:25:00 CST 1990.

You must have root authority to change the date and time.
To display the date and time in a specified format, enter:
date +”%r %a %d %h %y (Julian Date: %j)”
This displays the date shown in Example 2 as:

02:25:03 PM Fri 17 Feb 90 (Julian Date: 048)

Post By Editor (2,827 Posts)

Website: →