MCPcopy Create free account
hub / github.com/eggert/tz / localtime_tzset

Function localtime_tzset

localtime.c:2211–2225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2209# endif
2210
2211static struct tm *
2212localtime_tzset(time_t const *timep, struct tm *tmp, bool setname)
2213{
2214 monotime_t now = get_monotonic_time();
2215 int err = lock();
2216 if (0 < err) {
2217 errno = err;
2218 return NULL;
2219 }
2220 if (0 <= tz_change_interval || setname || !lcl_is_set)
2221 tzset_unlocked(!err, false, now);
2222 tmp = localsub(lclptr, timep, setname, tmp);
2223 unlock(!err);
2224 return tmp;
2225}
2226
2227struct tm *
2228localtime(const time_t *timep)

Callers 2

localtimeFunction · 0.85
localtime_rFunction · 0.85

Calls 5

get_monotonic_timeFunction · 0.85
lockFunction · 0.85
tzset_unlockedFunction · 0.85
localsubFunction · 0.85
unlockFunction · 0.85

Tested by

no test coverage detected