Home | History | Annotate | Download | only in misc

Lines Matching defs:ts

8  * Copyright 1995, 1996, 1997, 1998, 1999, 2000 by Theodore Ts'o.
1613 struct tm ts;
1618 memset(&ts, 0, sizeof(ts));
1620 strptime(str, "%Y%m%d%H%M%S", &ts);
1622 sscanf(str, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon,
1623 &ts.tm_mday, &ts.tm_hour, &ts.tm_min, &ts.tm_sec);
1624 ts.tm_year -= 1900;
1625 ts.tm_mon -= 1;
1626 if (ts.tm_year < 0 || ts.tm_mon < 0 || ts.tm_mon > 11 ||
1627 ts.tm_mday < 0 || ts.tm_mday > 31 || ts.tm_hour > 23 ||
1628 ts.tm_min > 59 || ts.tm_sec > 61)
1629 ts.tm_mday = 0;
1631 if (ts.tm_mday == 0) {
1637 ts.tm_isdst = -1;
1638 return (mktime(&ts));