XBee Firmware Library
1.6.0
|
Files | |
file | time.h |
file | xbee_time.c |
Functions | |
void | _xbee_mktime_normalize (int *major, int *minor, int count) |
struct tm * | xbee_gmtime (struct tm *dest_tm, xbee_utctime_t timestamp) |
Converts a UTCTime value into a "broken-down time" (a struct tm) for directly accessing month, day, year, hour, minute and second, or for use with other functions from <time.h>. More... | |
xbee_utctime_t | xbee_mktime (struct tm *time_rec) |
Convert a struct tm (from the Standard C Library's time.h ) to a xbee_utctime_t type (number of seconds since Midnight January 1, 2000 UTC). More... | |
Variables | |
const uint8_t | _xbee_time_dom [2][12] |
const uint16_t | _xbee_time_jom [2][12] |
XBEE_BEGIN_DECLS typedef uint32_t | xbee_utctime_t |
void _xbee_mktime_normalize | ( | int * | major, |
int * | minor, | ||
int | count | ||
) |
struct tm * xbee_gmtime | ( | struct tm * | dest_tm, |
xbee_utctime_t | timestamp | ||
) |
Converts a UTCTime value into a "broken-down time" (a struct tm) for directly accessing month, day, year, hour, minute and second, or for use with other functions from <time.h>.
[out] | dest_tm | Destination "struct tm" structure to hold the broken-down time. See time.h for details on that structure. |
[in] | timestamp | Timestamp to convert. Number of seconds since 1/1/2000 UTC. |
dest_tm
parameter. xbee_utctime_t xbee_mktime | ( | struct tm * | time_rec | ) |
Convert a struct tm (from the Standard C Library's time.h
) to a xbee_utctime_t type (number of seconds since Midnight January 1, 2000 UTC).
Does NOT properly handle DST and Timezones in the struct tm. Assumes the struct is in UTC. Keep this in mind if passing a struct tm generated by the host's gmtime() to this function.
[in] | time_rec | broken-down (componentized) calendar representation of time |
time_rec
is before 1/1/2000Handle DST and time zones.
const uint8_t _xbee_time_dom |
const uint16_t _xbee_time_jom |
XBEE_BEGIN_DECLS typedef uint32_t xbee_utctime_t |