Lines Matching refs:tm
13 * This function compares time and date fields of tm structure only.
17 static void checkStrptime(const char *s, const char *format, const struct tm *expected) {
18 struct tm tm = { };
21 ret = strptime(s, format, &tm);
24 } else if (tm.tm_sec != expected->tm_sec ||
25 tm.tm_min != expected->tm_min ||
26 tm.tm_hour != expected->tm_hour ||
27 tm.tm_mday != expected->tm_mday ||
28 tm.tm_mon != expected->tm_mon ||
29 tm.tm_year != expected->tm_year) {
34 strftime(buf2, sizeof(buf2), "%FT%H:%M:%S%Z", &tm);
42 struct tm tm = { };
45 ret = strptime(s, "%z", &tm);
48 } else if (tm.tm_gmtoff != expected) {
49 t_error("\"%%z\": for \"%s\" expected tm_gmtoff %ld but got %ld\n", s, tm.tm_gmtoff, expected);
53 static struct tm tm1 = {
62 static struct tm tm2 = {
71 static struct tm tm3 = {
80 static struct tm tm4 = {