Comments on How To Change The Date And Time From The Console

How To Change The Date And Time From The Console This short tutorial explains how you can modify your system date and time from the console.

6 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Marc Coxall

I like to use the natural language method

 date -s "July 20 2010 08:20"

By: mike list

i prefer to use ntpd which sets your system relative to greenwich mean time.

 

By: thaygiaoth

I think setup command is easy to solve this problem

 install: yum install setup

 

 

 

By: Anonymous

I use: date -u mmddhhmm (with the aid of an atomic watch), i.e. which sets the UTC time, and local time is resolved by locale (previously setup) as follows:

# setup local timezone
rm /etc/localtime
# setup for EDT and EST (+4 EDT; +5 EST)
ln -s /usr/share/zoneinfo/EST5EDT /etc/localtime
# setup for only EST (+5 EST)
#ln -s /usr/share/zoneinfo/EST /etc/localtime
rm /etc/timezone
echo "US/Eastern" > /etc/timezone
export TZ="/usr/share/zoneinfo/America/New_York"

 

By: Kamran Souratgar

After setting, sink your hardware time with this command:

 # hwclock -w

By: google

After google around, a more specific version is available here:

http://planet.admon.org/howto/set-timezone-date-and-time-in-linux/

It also helps me fix the time issues in a virtualized private server, enjoy :)