Date: Tue, 21 Oct 2008 23:16:50 +0200 (CEST) From: Per Hedeland <per@hedeland.org> To: freebsd-emulation@freebsd.org Cc: mezz7@cox.net, edwin@freebsd.org Subject: Re: Kind of solved.. [WAS: Re: Linux compat 2.6.16 reports time incorrect?] Message-ID: <200810212116.m9LLGoAB098676@pluto.hedeland.org> In-Reply-To: <op.ujd3z2li9aq2h7@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
"Jeremy Messenger" <mezz7@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810212116.m9LLGoAB098676>