linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: <mlan@cpu.lu>, <linuxppc-dev@lists.linuxppc.org>
Subject: Re: NVRAM stuck in DST?
Date: Fri, 7 Dec 2001 22:38:04 +0100	[thread overview]
Message-ID: <20011207213804.7802@smtp.wanadoo.fr> (raw)
In-Reply-To: <200112070759.IAA00984@piglet.grunz.lu>


>
>
>Hmmm... DST on? That's wrong; we're not in DST anymore! And the current
>offset to GMT is one hour, not two hours. I'm wondering whether
>something else besides MacOS sets those values.

AFAIK, MacOS is the only one to set it.

>If not, then I'll be stuck with whatever NVRAM values MacOS wrote there
>when it was last booted. Which means that unless at every DST time
>change, unless I bot MacOS once, I'll be stuck with the wrong time....

Yup, we need a proper tool for that. Actually, we need 2 things

 - a way for /dev/nvram to let userland know about the partitioning
of the nvram (expecially where the xpram is)
 - then a tool using that to write to the MachineLocation record
in nvram containing the tz offset and DST flag.

>Also, just for my understanding, doesn't MacOS save the system time in
>the RTC in localtime? In that case I don't see how time _advances_ on
>boot... unless the MacOS RTC is in DST-less localtime.

The kernel time is calculated from the RTC local time, offseted by
the pram gmt offset & dst to get a GMT time.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-12-07 21:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-07  7:59 NVRAM stuck in DST? Michel Lanners
2001-12-07 21:38 ` Benjamin Herrenschmidt [this message]
2001-12-07 21:39   ` Benjamin Herrenschmidt
2002-03-28 11:28   ` DST flag in NVRAM revisited (was: Re: NVRAM stuck in DST?) Michel Lanners
2002-03-28 13:04     ` Ethan Benson
2002-03-28 16:19       ` Geert Uytterhoeven
2002-03-28 23:31         ` Ethan Benson
2002-03-29  0:47           ` bug: kernel timer added twice at e3259abc Kevin B. Hendricks
2002-03-28 17:18       ` DST flag in NVRAM revisited (was: Re: NVRAM stuck in DST?) benh
2002-03-28 23:28         ` Ethan Benson
2001-12-07 22:09 ` NVRAM stuck in DST? Greg Noel
2001-12-08 11:24 ` Gabriel Paubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011207213804.7802@smtp.wanadoo.fr \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=mlan@cpu.lu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).