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

Function time2

localtime.c:2821–2838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2819}
2820
2821static time_t
2822time2(struct tm * const tmp,
2823 struct tm *funcp(struct state const *, time_t const *,
2824 int_fast32_t, struct tm *),
2825 struct state const *sp,
2826 const int_fast32_t offset,
2827 bool *okayp)
2828{
2829 time_t t;
2830
2831 /*
2832 ** First try without normalization of seconds
2833 ** (in case tm_sec contains a value associated with a leap second).
2834 ** If that fails, try with normalization of seconds.
2835 */
2836 t = time2sub(tmp, funcp, sp, offset, okayp, false);
2837 return *okayp ? t : time2sub(tmp, funcp, sp, offset, okayp, true);
2838}
2839
2840static time_t
2841time1(struct tm *const tmp,

Callers 1

time1Function · 0.85

Calls 1

time2subFunction · 0.85

Tested by

no test coverage detected