Implementation of the makelocaltime() function to convert a time_t to a struct tm containing the local time. More...
Go to the source code of this file.
Functions | |
struct tm * | makelocaltime (const time_t *time, struct tm *timestruct) |
Convert the given time to local time. | |
Implementation of the makelocaltime() function to convert a time_t to a struct tm containing the local time.
Definition in file makelocaltime.c.
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().