This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RTC -> Gregorian Conversion (off topic)


"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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]