ltime
Returns the current local (not UTC) time
#include <time.h>
time_t ltime (
time_t *timer);
Returns the current local time encoded into the time_t structure.
ltime is the local equivalent of time and includes adjustments for daylight-savings time (if it is implemented and active for the current locale). The time is encoded and represents the time in seconds since January 1, 1970 at 00:00:00. Note that a corrupted calendar time is returned, since time_t holds the calendar or UTC time. ltime returns the local time expressed in a scalar that can be stored; however, this value should not be passed to any other time function.
To retrieve the offset, in seconds, for the current locale from the UTC time and have it adjusted for daylight-savings time, use the following:
offset = difftime(ltime(NULL), time(NULL));