Convert date & time to time_t

H

HMS Surprise

I am working with an ARM946ES processor running C under Nucleus. I need to
take time and date (year, month, day, hour, minute, second) from an external
RTC chip and convert it to time_t to reset the system clock. Do you know of
a routine or library function for this conversion?

Thanks,

john
 
G

Gordon Burditt

I am working with an ARM946ES processor running C under Nucleus. I need to
take time and date (year, month, day, hour, minute, second) from an external
RTC chip and convert it to time_t to reset the system clock. Do you know of
a routine or library function for this conversion?

Look at mktime(). It takes a struct tm (which you fill in from the
info you have) and produces a time_t.

Gordon L. Burditt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top