| 2819 | } |
| 2820 | |
| 2821 | static time_t |
| 2822 | time2(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 | |
| 2840 | static time_t |
| 2841 | time1(struct tm *const tmp, |