Joined: 16 Apr 2002
|Posted: Tue Feb 04, 2003 5:37 am Post subject: SA4: Should I set CLOCK to local or UTC?
|The BIOS stores the time and date information without any concept of timezone, but your computer's operating system provides you with that opportunity. You either set this date to your local time or to GMT (aka UTC) in /etc/conf.d/clock (as of >=baselayout-1.11, older versions use /etc/rc.conf):
|# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time). If your clock is set to the local time, then set CLOCK
# to "local". This setting is used by the /etc/init.d/clock script.
If you set it to CLOCK="UTC", then Linux will automatically add/subtract the necessary number of hours, taking daylight saving into account (provided you've set your timezone as recommended in the installation guide). This is the cleaner way of doing things. In particular, selecting UTC prevents "clock warp", which can mess up all kinds of things, notably make. If you untar something during the daylight savings switchover hour, make may refuse to work after the switch for an hour, because it will think timestamps are in the future. In general, the system clock should not have discontinuities, and timezone display should be an output thing, not an internal thing. On Linux-only hosts, UTC is therefore recommended.
Things are slightly different if you dual boot with Windows, then you need to set CLOCK="local". Windows assumes your BIOS is set to local time and will physically change the date stored in the hardware. For a sane display of your local time zone in Windows, you need the local time setting in /etc/conf.d/clock.
Compiled from several posts in Localtime vs GMT - what to choose?
2005-09-14: Updated location of clock setting and installation handbook reference. --kallamej
Those who know what's best for us must rise and save us from ourselves.