Lines Matching refs:ts
215 struct tm ts; in string_to_time() local
229 memset(&ts, 0, sizeof(ts)); in string_to_time()
231 strptime(arg, "%Y%m%d%H%M%S", &ts); in string_to_time()
233 sscanf(arg, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon, in string_to_time()
234 &ts.tm_mday, &ts.tm_hour, &ts.tm_min, &ts.tm_sec); in string_to_time()
235 ts.tm_year -= 1900; in string_to_time()
236 ts.tm_mon -= 1; in string_to_time()
237 if (ts.tm_year < 0 || ts.tm_mon < 0 || ts.tm_mon > 11 || in string_to_time()
238 ts.tm_mday < 0 || ts.tm_mday > 31 || ts.tm_hour > 23 || in string_to_time()
239 ts.tm_min > 59 || ts.tm_sec > 61) in string_to_time()
240 ts.tm_mday = 0; in string_to_time()
242 ts.tm_isdst = -1; in string_to_time()
243 ret = mktime(&ts); in string_to_time()
244 if (ts.tm_mday == 0 || ret == ((time_t) -1)) { in string_to_time()