Lines Matching refs:t
63 time_t t = 0; in TEST() local
64 tm* broken_down = gmtime(&t); in TEST()
76 time_t t = 0; in TEST() local
77 struct tm* broken_down = gmtime_r(&t, &tm); in TEST()
117 pthread_t t; in TEST() local
118 ASSERT_EQ(0, pthread_create(&t, &a, gmtime_no_stack_overflow_14313703_fn, nullptr)); in TEST()
119 ASSERT_EQ(0, pthread_join(t, nullptr)); in TEST()
126 struct tm t; in TEST() local
127 memset(&t, 0, sizeof(tm)); in TEST()
128 t.tm_year = 1980 - 1900; in TEST()
129 t.tm_mon = 6; in TEST()
130 t.tm_mday = 2; in TEST()
134 ASSERT_EQ(static_cast<time_t>(331372800U), mktime(&t)); in TEST()
136 memset(&t, 0, sizeof(tm)); in TEST()
137 t.tm_year = 1980 - 1900; in TEST()
138 t.tm_mon = 6; in TEST()
139 t.tm_mday = 2; in TEST()
143 ASSERT_EQ(static_cast<time_t>(331344000U), mktime(&t)); in TEST()
171 struct tm t; in TEST() local
172 memset(&t, 0, sizeof(tm)); in TEST()
175 t.tm_year = 2016 - 1900; in TEST()
177 t.tm_mon = 2; in TEST()
178 t.tm_mday = 10; in TEST()
181 ASSERT_NE(static_cast<time_t>(-1), mktime(&t)); in TEST()
185 t.tm_year = INT_MAX; in TEST()
188 ASSERT_EQ(static_cast<time_t>(-1), mktime(&t)); in TEST()
195 struct tm t; in TEST() local
196 memset(&t, 0, sizeof(tm)); in TEST()
197 t.tm_year = 2022 - 1900; in TEST()
198 t.tm_mon = 11; in TEST()
199 t.tm_mday = 31; in TEST()
201 t.tm_isdst = 1; in TEST()
205 EXPECT_EQ(static_cast<time_t>(-1), mktime(&t)); in TEST()
232 struct tm t; in TEST() local
233 memset(&t, 0, sizeof(tm)); in TEST()
234 t.tm_year = 200; in TEST()
235 t.tm_mon = 2; in TEST()
236 t.tm_mday = 10; in TEST()
242 EXPECT_EQ(10U, strftime(buf, sizeof(buf), "%s", &t)); in TEST()
247 EXPECT_EQ(24U, strftime(buf, sizeof(buf), "%c", &t)); in TEST()
254 struct tm t; in TEST() local
255 memset(&t, 0, sizeof(tm)); in TEST()
256 t.tm_year = 1969 - 1900; in TEST()
257 t.tm_mon = 11; in TEST()
258 t.tm_mday = 31; in TEST()
259 t.tm_hour = 23; in TEST()
260 t.tm_min = 59; in TEST()
261 t.tm_sec = 59; in TEST()
265 EXPECT_EQ(2U, strftime(buf, sizeof(buf), "%s", &t)); in TEST()
271 struct tm t; in TEST() local
272 memset(&t, 0, sizeof(tm)); in TEST()
279 t.tm_isdst = 0; // "0 if Daylight Savings Time is not in effect". in TEST()
280 EXPECT_EQ(5U, strftime(buf, sizeof(buf), "<%Z>", &t)); in TEST()
284 t.tm_isdst = 2; // "positive if Daylight Savings Time is in effect" in TEST()
285 EXPECT_EQ(5U, strftime(buf, sizeof(buf), "<%Z>", &t)); in TEST()
288 t.tm_isdst = -123; // "and negative if the information is not available". in TEST()
289 EXPECT_EQ(2U, strftime(buf, sizeof(buf), "<%Z>", &t)); in TEST()
296 t.tm_isdst = 0; in TEST()
297 EXPECT_EQ(5U, strftime(buf, sizeof(buf), "<%Z>", &t)); in TEST()
301 t.tm_isdst = 1; // UTC has no DST. in TEST()
302 EXPECT_EQ(2U, strftime(buf, sizeof(buf), "<%Z>", &t)); in TEST()
393 struct tm t; in TEST() local
394 memset(&t, 0, sizeof(tm)); in TEST()
395 t.tm_year = 200; in TEST()
396 t.tm_mon = 2; in TEST()
397 t.tm_mday = 10; in TEST()
401 EXPECT_EQ(24U, strftime_l(buf, sizeof(buf), "%c", &t, cloc)); in TEST()
411 struct tm t; in TEST() local
414 memset(&t, 0, sizeof(t)); in TEST()
415 strptime("11:14", "%R", &t); in TEST()
416 strftime(buf, sizeof(buf), "%H:%M", &t); in TEST()
419 memset(&t, 0, sizeof(t)); in TEST()
420 strptime("09:41:53", "%T", &t); in TEST()
421 strftime(buf, sizeof(buf), "%H:%M:%S", &t); in TEST()
429 struct tm t; in TEST() local
432 memset(&t, 0, sizeof(t)); in TEST()
433 strptime_l("11:14", "%R", &t, LC_GLOBAL_LOCALE); in TEST()
434 strftime_l(buf, sizeof(buf), "%H:%M", &t, LC_GLOBAL_LOCALE); in TEST()
437 memset(&t, 0, sizeof(t)); in TEST()
438 strptime_l("09:41:53", "%T", &t, LC_GLOBAL_LOCALE); in TEST()
439 strftime_l(buf, sizeof(buf), "%H:%M:%S", &t, LC_GLOBAL_LOCALE); in TEST()
608 void SetTime(timer_t t, time_t value_s, time_t value_ns, time_t interval_s, time_t interval_ns) { in SetTime() argument
614 ASSERT_EQ(0, timer_settime(t, 0, &ts, nullptr)); in SetTime()
1107 time_t t = 1475619727; in TEST() local
1112 ASSERT_TRUE(localtime_r(&t, &tm) != nullptr); in TEST()
1117 ASSERT_TRUE(localtime_r(&t, &tm) != nullptr); in TEST()
1122 ASSERT_TRUE(localtime_r(&t, &tm) != nullptr); in TEST()
1127 ASSERT_TRUE(localtime_r(&t, &tm) != nullptr); in TEST()
1132 ASSERT_TRUE(localtime_r(&t, &tm) != nullptr); in TEST()
1137 ASSERT_TRUE(localtime_r(&t, &tm) != nullptr); in TEST()
1151 time_t t = 1475619727; in TEST() local
1159 struct tm* tm_p = localtime(&t); in TEST()
1170 localtime_r(&t, &tm); in TEST()
1191 const time_t t = 0; in TEST() local
1192 ASSERT_STREQ("Thu Jan 1 00:00:00 1970\n", ctime(&t)); in TEST()
1197 const time_t t = 0; in TEST() local
1199 ASSERT_EQ(buf, ctime_r(&t, buf)); in TEST()