This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: RTC -> Gregorian Conversion (off topic)
- To: "'Jonathan Larmour'" <jlarmour at redhat dot com>
- Subject: RE: [ECOS] RTC -> Gregorian Conversion (off topic)
- From: "Trenton D. Adams" <tadams at extremeeng dot com>
- Date: Thu, 19 Jul 2001 15:51:44 -0600
- Cc: "'eCos mailing list'" <ecos-discuss at sources dot redhat dot com>
- Organization: Extreme Engineering
>
> "Trenton D. Adams" wrote:
> >
> > Sorry for the off topic question, but I don't know where else to
look
> > for a quick answer. Does anyone here have tables/routines for
> > calculating the actual date/time from an RTC value? Does eCos do
this
> > already? If so, where?
> >
> > I also need to go from date/time to RTC.
>
> There are various functions in the C library to convert between
time_t's
> and real dates if that's what you mean, although they don't take
into
> account all the esoteric rules for timezones. That's too much for a
> typical
> embedded system's needs. Currently the time() function will retrieve
the
> time from the wallclock device, so that would have to have been
> initialized
> correctly.
>
> Look around in languages/c/libc/time/current
>
Will do, thanks.