Re: hwclock problem with leapseconds - posix?
- From: Unruh <unruh-spam@xxxxxxxxxxxxxx>
- Date: Wed, 02 Jan 2008 23:32:41 GMT
ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin) writes:
On Tue, 1 Jan 2008, in the Usenet newsgroup comp.os.linux.setup, in article
<7321c5fa-4933-423d-99cb-fe0d71aef9ec@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
cc-tec@xxxxxx wrote:
NOTE: Posting from groups.google.com (or some web-forums) dramatically
reduces the chance of your post being seen. Find a real news server.
in my particular case i'd like to have accurate timestamps for the
boot phase too
What distribution? Most systems set the "software" clock in the
first boot script. Assuming your system uses /etc/inittab (most do),
look at the 'System initialization' script
He claims that he has problems on bootup that the hwclock --rtctosys does
not work properly, and introduces hiw 23 sec out.
Mind you since the hardware clock will drift by few sec per hour anyway,
this seems pretty pointless worry, but lets accept his worry.
and cannot guarantee alltime ntp access, i'd dislike to have the time
22 seconds off per default when ntp does not work instantly after reboot,
I've no idea where you are finding a 22 second difference, as the current
difference between UTC and TAI is 33 seconds (see
Linux time I believe has 1970 as the reference time, and there are 23
leapseconds between then and now.
....
for me it looks like a problem with leapseconds, not a problem of
leapseconds, just a problem how systems deal with them, in this
particular case that hwclock is dealing differently for the --systohc
and the --hctosys functionality,
I'm not sure why you are having a problem, as running hwclock with
those two options does not introduce a _difference_ in the times.
He claims that IF he uses the djb extentions which use a different set of
tzdata zoninfo files which take into account leap seconds that then hwclock
going one way and then the other gives a 23 sec mismatch.
Ie, his system and rtc is on munged atomic time ( with Jan1 0:0:0 as the
epoch) and somehow the 22 or 23 saec is coming in there.
He has gotten convinced by djb that everyone else in the world does things
wrongly and badly, and wants to have his system on Bernstein time, rather
than UTC with the zoneinfo files translating from Bernstein time to UTC.
[trashbox7 /]# /sbin/hwclock --show ; /bin/date
Wed Jan 2 12:34:52 2008 -0.205553 seconds
Wed Jan 2 12:34:52 MST 2008
[trashbox7 /]# /sbin/hwclock --systohc
[trashbox7 /]# /sbin/hwclock --show ; /bin/date
Wed Jan 2 12:35:01 2008 -0.194958 seconds
Wed Jan 2 12:35:01 MST 2008
[trashbox7 /]# /sbin/hwclock --hctosys
[trashbox7 /]# /sbin/hwclock --show ; /bin/date
Wed Jan 2 12:35:09 2008 -0.280010 seconds
Wed Jan 2 12:35:09 MST 2008
Well yours is obvioulsy out by 8 sec. See hwclock to hc is at 12:35:01 and
when you read it back it is at 12:35:09 :-)
Anyway his argument is the problem occurs only if he is one munged tia, not
utc.
[trashbox7 /]
Here, the RTC in trashbox7 is set to localtime (DST isn't used here).
What timezone are you using in the system (what does the shell variable
TZ return, or what does /etc/localtime point to, or if all else fails,
what does '/bin/date ; /bin/date -u' show)?
Old guy.
- Follow-Ups:
- Re: hwclock problem with leapseconds - posix?
- From: Moe Trin
- Re: hwclock problem with leapseconds - posix?
- References:
- hwclock problem with leapseconds - posix?
- From: cc-tec
- Re: hwclock problem with leapseconds - posix?
- From: Nico Kadel-Garcia
- Re: hwclock problem with leapseconds - posix?
- From: Michael Black
- Re: hwclock problem with leapseconds - posix?
- From: cc-tec
- Re: hwclock problem with leapseconds - posix?
- From: Moe Trin
- hwclock problem with leapseconds - posix?
- Prev by Date: Re: Linux reboots right after Grug runs initrd
- Next by Date: Re: hwclock problem with leapseconds - posix?
- Previous by thread: Re: hwclock problem with leapseconds - posix?
- Next by thread: Re: hwclock problem with leapseconds - posix?
- Index(es):
Relevant Pages
|