Note: This is a repost of an old website page. It has just been moved it here as a blog.
The Linux machine maintains the date and time, firstly, like all other personal computers on the hardware, this is sometimes referred to as the Basic Input and Output System (BIOS) or Complementary Metal Oxide Semiconductor (CMOS). The second date and time reference is maintained by the operating system, and is updated from the hardware clock during boot-up. During the Linux installation, the hardware clock is configured to be in Coordinated Universal Time (UTC) or Greenwich Meridian Time (GMT) The latter is often referred to as the system clock and the former is usually known as the hardware clock.
During boot-up the system clock is initialised with the date and time on the hardware clock. The advantage of maintaining time in UTC is that the Linux system will automatically account for daylight savings based on your timezone. The timezone information for the Linux box is configured via the /etc/localtime file.
The man page for the hwclock command provides more detailed information on the time keeping features of Linux. The file /etc/localtime is a symbolic link to the timezone data found under the /usr/share/zoneinfo directory.
- To set the timezone, create the appropriate symbolic link
- /bin/ln -sf ../usr/share/zoneinfo/Pacific/Fiji /etc/localtime
- /bin/vi /etc/sysconfig/clock
- /bin/date MMDDhhmm.ss
- /sbin/hwclock --systohc
- Linux man page for date
- Linux man page for hwclock