Archive for the tag 'Date'

SBDavid

Date and Time Setup

Date and Time Setup

The date command allows the superuser to set the system date and time manually:

Change the current date.

Type the command in the following form at a shell prompt, replacing the YYYY with a four-digit year,
MM with a two-digit month, and DD with a two-digit day of the month:

For example, to set the date to 2 June 2010, type:

# date +%D -s 2010-06-02

Change the current time. Use the following command, where HH stands for an hour,
MM is a minute, and SS is a second, all typed in a two-digit form:

For instance, to set the system clock to 11:26 PM using the UTC, type:

# date +%T -s 23:26:00 -u

You can check your current settings by typing date without any additional argument:

# date
SBDavid

How to Change Date and Time

How to Change Date and Time

You can change the date and time on linux machine using the date command.

Example: If you want to change the date to July 31, 11:16 pm then type as follows

date 07312316

If you want to change the year as well, you could type

“date 073123161998”

You can also use the following:

date -s “31 JULY 2009 23:16:00″