Datasheet

Time_epochToDate
574
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Time_epochToDate(long e, TimeStruct *ts);
Returns Nothing.
Description
Converts the unix time to time and date.
Parameters :
- e: unix time (seconds since unix epoch)
- ts: time and date structure for storing conversion output
Requires Nothing.
Example
#include "timelib.h"
...
TimeStruct ts2;
long epoch ;
...
/*
* what date is epoch 1234567890 ?
*/
epoch = 1234567890 ;
Time_epochToDate(epoch, &ts2) ;