3 long long __tm_to_secs(const struct tm
*tm
)
6 long long year
= tm
->tm_year
;
7 int month
= tm
->tm_mon
;
8 if (month
>= 12 || month
< 0) {
17 long long t
= __year_to_secs(year
, &is_leap
);
18 t
+= __month_to_secs(month
, is_leap
);
19 t
+= 86400LL * (tm
->tm_mday
-1);
20 t
+= 3600LL * tm
->tm_hour
;
21 t
+= 60LL * tm
->tm_min
;