[geeks] BIOS & timezone interaction under Linux

Jonathan C. Patschke jp at celestrion.net
Tue Jan 13 15:27:38 CST 2004


On Tue, 13 Jan 2004, Nadine Miller wrote:

> On an Linux box (x86), does the BIOS TZ setting
> impact the OS?  My understanding is that the OS
> gets it's initial clock time at boot up from the
> HW clock.

I don't know how PCs do this, but everywhere else, the hardware clock is
set to UTC, and "local time" is a function of the TZ environment
variable.

On the PC, I'd assume that, since BIOS time is usually local time, the
system (in addition to a per-user TZ variable) has a global timezone
stated somewhere, so the system knows how far off UTC the hardwre clock
is.

> (I'm not even sure about 'UTC=true' for switching PST to PDT and vice
> versa; I see conflicting info.)

I'm not sure about Linux, but everywhere else this is a function of the
C runtime library.  The OS proper doesn't care about daylight savings
time, as it just worries about seconds after the Epoch; it's up to
userland code to interpret that value into something the end-user can
handle.

-- 
Jonathan Patschke  ) "Some people grow out of the petty theft of
Elgin, TX         (   childhood.  Others grow up to be CEOs and
USA                )  politicians."                    --Phorist



More information about the geeks mailing list