Lines Matching defs:tm
1876 struct tm tm;
1877 memset(&tm, 0, sizeof(tm));
1880 if(sscanf(str, "%4d%2d%2d%2d%2d%2d", &tm.tm_year, &tm.tm_mon,
1881 &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6)
1883 tm.tm_year -= 1900;
1884 tm.tm_mon--;
1886 if (tm.tm_year < 70) return 0;
1887 if (tm.tm_mon < 0 || tm.tm_mon > 11) return 0;
1888 if (tm.tm_mday < 1 || tm.tm_mday > 31) return 0;
1889 if (tm.tm_hour < 0 || tm.tm_hour > 23) return 0;
1890 if (tm.tm_min < 0 || tm.tm_min > 59) return 0;
1891 if (tm.tm_sec < 0 || tm.tm_sec > 59) return 0;
1893 t = sldns_mktime_from_utc(&tm);