The date command can be used to set the date and time of a Linux system. It can also be used to print the current date and time.

You can use date command without any arguments to print the current date and time as shown below.

[neo@techpulp ~]# date
Sat Nov  8 10:52:28 PST 2008
[neo@techpulp ~]#

Now let us see how to set the date and time using date command. The date command expect the date and time in [MMDDhhmm[[CC]YY][.ss]] format.
Remember you should have super-user privileges to do this. The following example sets the date and time to Dec 31, 2008 10:00.

[root@techpulp ~]# date 123110002008
Wed Dec  31 10:00:00 PST 2008
[root@techpulp ~]#
[root@techpulp ~]# date
Wed Dec  31 10:00:03 PST 2008
[root@techpulp ~]#