Kind of solved.. [WAS: Re: Linux compat 2.6.16 reports time incorrect?]

Per Hedeland per at hedeland.org
Tue Oct 21 21:31:31 UTC 2008


"Jeremy Messenger" <mezz7 at cox.net> wrote:
>
>It won't work, because if you read Boris's ktrace and you will see it  
>reads in /etc/localtime.

Boris' ktrace did indeed show that (though I don't know how he deduced
that the file was "rejected", rather than read three times due simply to
sloppy programming) - but he didn't mention whether he got the time
difference between native and Linux 'date' that you reported.

> So if I copy it to /compat/linux/etc/localtime  
>and it won't makes any difference, since it's same file. :-)

But we haven't seen a trace from *your* system - if you actually have
(or had) a /compat/linux/etc/localtime file, it will of course be read
and no fall-through to /etc/localtime will happen - and if
/compat/linux/etc/localtime has the wrong contents, you will get the
wrong output from Linux 'date'.

>I have downloaded tzdata-2008h-1.fc8.noarch.rpm and extracted it. Then  
>copy it in /compat/linux/etc/localtime and now it works correct. Only a  
>few seconds difference, but does not matter to me.

And if you remove it, i.e. no /compat/linux/etc/localtime at all, what
is the result? Not having it would seem to be the sane solution - it's
certainly the case for linux_base-fc-4.

The /etc/localtime file on Linux as on FreeBSD is just a copy of (or
link to) the appropriate zic-compiled Olson zone file - I can't claim to
have investigated it, but changing the compiled format would seem to be
out of the question, since it would wreak havoc with all the many Unix
systems that use these files (and that periodically have to update them
to cater to the whims of politicians all over the world).

Hm, I guess it's possible that FC modified 'zic' from what comes with
the Olson files (and their libc functions that read it to match) - but
even that would seem incredibly unlikely I think, just asking for
trouble.

--Per Hedeland


More information about the freebsd-emulation mailing list