Linux - Date command, How to change your system date and time

Date command

The date command is use to set or change your system date or time

date command to view the the current date and time
  # date

  Thu Dec 24 19:06:46 IST 2009

How to change your system date and time?
  date MMDDhhmmYYYY.ss

where,

MM = month of the year (01 to 12)
dd = day of the month (01 to 31)
hh = hour of the day (00 to 23)
mm = minute of the hour (00 to 59>
cc = The first to digits of the year
yyyy = Year
.ss = Seconds


  # date 061215002009


The output for the above date command is

   Thu Jun 12 15:00:00 IST 2009


OR

You can also use the bellow command to set date and time
  # date -s "12 JUN 2009 12:00:00"

  # date set="12 JUN 2009 12:00:00"

  # date +%Y%m%d -s "20090612"

The above are the some of the linux commands which are used to set date and time in linux machine.

The topic on Linux - Date command is posted by - Malu

Hope you have enjoyed, Linux - Date commandThanks for your time

Tech Bluff