Design Pattern Examples
Overview of object-oriented design patterns
makelocaltime.c
Go to the documentation of this file.
1
5
6#include <time.h>
7
8#include "makelocaltime.h"
9
11// makelocaltime function
13struct tm* makelocaltime(const time_t* time, struct tm* timestruct)
14{
15 struct tm* returnstruct = NULL;
16 if (time != NULL && timestruct != NULL)
17 {
18 returnstruct = localtime(time);
19 *timestruct = *returnstruct;
20 returnstruct = timestruct;
21 }
22 return returnstruct;
23}
Declaration of the makelocaltime() function to convert a time_t to a struct tm containing the local t...
struct tm * makelocaltime(const time_t *time, struct tm *timestruct)
Convert the given time to local time.
Definition: makelocaltime.c:13