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: "Trenton D. Adams" <tadams at extremeeng dot com>
- Subject: Re: [ECOS] RTC -> Gregorian Conversion (off topic)
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 19 Jul 2001 22:49:21 +0100
- Cc: 'eCos mailing list' <ecos-discuss at sources dot redhat dot com>
- Organization: Red Hat UK Ltd.
- References: <000201c11081$4ce3d5f0$090110ac@TRENT>
"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
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/