Declaration of the makelocaltime() function to convert a time_t to a struct tm containing the local time. More...
#include <time.h>
Go to the source code of this file.
Macros | |
#define | __MAKELOCALTIME_H__ |
Functions | |
struct tm * | makelocaltime (const time_t *time, struct tm *timestruct) |
Convert the given time to local time. | |
Declaration of the makelocaltime() function to convert a time_t to a struct tm containing the local time.
Definition in file helpers/makelocaltime.h.
#define __MAKELOCALTIME_H__ |
Definition at line 8 of file helpers/makelocaltime.h.
struct tm * makelocaltime | ( | const time_t * | time, |
struct tm * | timestruct | ||
) |
Convert the given time to local time.
Hides the differences between multiple C library implementations.
time | Pointer to the time_t object representing the time to convert. |
timestruct | Pointer to a struct tm in which to put the results of converting to local time. |
This is an example of a function acting as an adapter (see Adapter Pattern). The rest of the program just wants to convert a time stamp to local time and doesn't want to know about the differences between implementations of the C library.
Definition at line 13 of file makelocaltime.c.
Referenced by datetime_to_string().