David Douthitt wrote:
> 
> I've been looking into the date and time set in an Oxygen system, and
> comparing to a Mandrake system.

Well, we can agree that busybox date doesn't work, because
you proved that to be the case when you cc'd the list with
your email to busybox devel.  The guy said it was broken
and that was the main source of your problems.  I get the
vague impression that you've dismissed that reasoning to
some extent?


 
> The confusion comes this way:
> 
> * Hardware clock: set value
> * Hardware clock (hwclock): value displayed
> * System clock: set value
> * System clock: value displayed
> 
> ...and these interact with:
> 
> * /etc/localtime
> * TZ


May I suggest the following which will clear up most
of your confusion.  Remember to keep in mind that
hwclock interacts with date (which is broken).

  http://nodevice.com/sections/ManIndex/man0159.html


 
> It would also appear that the man page for asctime(2) is wrong, and
> that the variable timezone is NOT set as it says it is.

Details plz.


 
> It would also appear that:
> 
> * hwclock does not shift the time read according to timezone; it just
> "stamps" the output with the given timezone

It's not completey clear what you're saying.  May I suggest again 
the URL above.  It contains an absolutely unambiguous statement 
describing exactly what the --utc does to hwclock.


> * hwclock remembers how the RTC was set - thus, hwclock --show may
> report UTC, or it may report localtime...

I didn't spot that in the man page I was reading,
but that's not to say I'm looking where I should be :)
Of course I saw it in Jeff's followup.  

 
> I'm also getting lost in functions:
> 
> gettimeofday()
> tzset()
> time()
> localtime()
> 
> ...which ONE of these gets the timezone right?


Talk to Jeff :-o

 
> Then there's header files:
> 
> #include <time.h>
> #include <linux/time.h>
> #include <sys/time.h>
> 
> *ALL* of these conflict....
> 
> And it even appears that busybox date may be reporting the wrong
> time... sigh...


I thought that's the crux.  At least a big part of hwclock's problems.
It uses the date output to construct the command.

 
> I wrote my own time display program (tz) just for testing purposes -
> it calls all of the above functions.  I'll try to put it up on in the
> development area with source code.

Nifty.  I sort of enjoy the torture of C coding time functions.
It's old timer stuff.  It reminds me of the days before Perl
and having to code hellacious string manipulation functions
from scratch.

 

> My hypothesis are:
> 
> * hwclock works differently than I thought
> * there may be actual bugs in busybox date
> * I may be mixing up standard C functions, Linux kernel functions, and
> old obsolete Linux kernel functions
> 
> Someone give me an aspirin!


When in doubt, shop for high speed networking equipment.
Matt

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to