Linux datetime
Linux December 8th, 2008
- su to root
- Find your timezone file under /usr/share/zoneinfo. For example:
/usr/share/zoneinfo/Asia/Bangkok - OPTIONAL: backup the current timezone configuration:
cp /etc/localtime /etc/localtime.bak - Create a symbolic link from the appropiate timezone to /etc/localtime.
ln -sf /usr/share/zoneinfo/Asia/Bangkok /etc/localtime - Use rdate or ntpdate to set the system time (ntpdate is better):
/usr/sbin/ntpdate time.nist.gov
or
/usr/bin/rdate time.nist.gov - Set the hardware clock to the system time:
/sbin/hwclock –systohc
Note: you may install ntp via yum if ntpdate does not exists on your system.
Related Posts
Tags: datetime ntpdate linux
About
Leave a Comment