Clock configuration

From Elvanör's Technical Wiki
Revision as of 16:32, 3 September 2009 by Elvanor (talk | contribs) (New page: = Time zones = * The file /etc/localtime (which is normally a copy of a file in /usr/share/zoneinfo) contains time zone data. The date command (or any time the system must compute a date)...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Time zones

  • The file /etc/localtime (which is normally a copy of a file in /usr/share/zoneinfo) contains time zone data. The date command (or any time the system must compute a date) looks at this file to determine the actual time. So if you change it the computer time will also instantly change.
  • When the clock is initialized via the Gentoo /etc/init.d/clock script, the system looks at the hardware clock (which can be set to UTC or local time) and probably also at the TIMEZONE setting to guarantee a correct setup (if the data is correct of course). Thus if you change the timezone (/etc/localtime) and run /etc/init.d/clock restart, the time will be correct; if you later change the timezone file again, it won't (assuming you did not actually change your physical timezone).