lkml.org 
[lkml]   [1999]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateThu, 18 Nov 1999 14:15:59 +0100
FromGuest section DW <>
SubjectRe: updating the RTC automagically
On Tue, Nov 16, 1999 at 09:16:36AM +0200, Ulrich Windl wrote:

: I investigated what would be needed to set the RTC when the system
: time changes. First the inverse function for mktime() is needed (i.e.
: convert UNIX time to days, hours, months, etc.) Then the function to
: set the RTC would have to be extended to set _all_ the values, not
: just minute and second.
:
: Should I take the date conversion routine from the C library (i.e.
: copy the code)?

Sounds like a bad idea.

(i) The function exists already and lives in user space - hwclock.
(ii) This would add a very large amount of bloat without any
increase in functionality.
(iia) This would add a maintenance duty to update kernel data
each time some political body takes a decision about when DST starts, etc.

I hope you realize that libc uses /etc/localtime which points at
some file in /usr/share/zoneinfo or so, and since one cannot access
such files from the kernel, they would have to be compiled into the kernel.
Even if a configuration option selects the part you need, this would
still add more than a megabyte to the kernel source.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2010