The Mike Files

Laus Deo Semper

Posts Tagged ‘timezone

Change Date/Time & Timezone in Linux

leave a comment »

I normally used to change the date & time of my Linux box using the following commands:

  1. Copy or create a symbolic link /etc/localtime to a file in the /usr/share/zoneinfo directory that corresponds with what timezone I am in
    # cp /etc/localtime /etc/localtime.old (backup)
    # cp /usr/share/zoneinfo/Asia/Singapore /etc/localtime

  2. Use the rdate command for me to sync with Time Servers (e.g. time.nist.gov)
    # rdate -s time-a.nist.gov

  3. And I set the date/time to the hardware clock
    # /sbin/hwclock –systohc

  4. Now it’s sync up properly.

Written by themikefiles

June 15, 2009 at 9:17 am

Posted in Linux, Open Source

Tagged with ,

Follow

Get every new post delivered to your Inbox.