/time/ |
A D | tst-strptime3.c | 11 struct tm tm; in do_test() local 13 memset (&tm, 0xaa, sizeof (tm)); in do_test() 18 if (strptime ("2007", "%Y", &tm) == NULL in do_test() 19 || strptime ("12", "%d", &tm) == NULL in do_test() 29 if (tm.tm_sec != 21 || tm.tm_min != 13 || tm.tm_hour != 16 in do_test() 30 || tm.tm_mday != 12 || tm.tm_mon != 1 || tm.tm_year != 107 in do_test() 31 || tm.tm_wday != 1 || tm.tm_yday != 42) in do_test() 37 if (strptime ("8", "%d", &tm) == NULL) in do_test() 43 if (tm.tm_sec != 21 || tm.tm_min != 13 || tm.tm_hour != 16 in do_test() 44 || tm.tm_mday != 8 || tm.tm_mon != 1 || tm.tm_year != 107 in do_test() [all …]
|
A D | tst-mktime2.c | 56 struct tm tm; in spring_forward_gap() local 65 tm.tm_mon = 3; in spring_forward_gap() 68 tm.tm_min = 0; in spring_forward_gap() 69 tm.tm_sec = 0; in spring_forward_gap() 102 struct tm tm; in irix_6_4_bug() local 104 tm.tm_mon = 3; in irix_6_4_bug() 107 tm.tm_min = 0; in irix_6_4_bug() 110 mktime (&tm); in irix_6_4_bug() 118 struct tm tm; in bigtime_test() local 120 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; in bigtime_test() [all …]
|
A D | tst-getdate.c | 33 struct tm tm; member 111 struct tm *tm; in do_test() local 117 tm = getdate (tests[i].str); in do_test() 126 TEST_COMPARE (tests[i].tm.tm_mon, tm->tm_mon); in do_test() 127 TEST_COMPARE (tests[i].tm.tm_year, tm->tm_year); in do_test() 128 TEST_COMPARE (tests[i].tm.tm_mday, tm->tm_mday); in do_test() 129 TEST_COMPARE (tests[i].tm.tm_hour, tm->tm_hour); in do_test() 130 TEST_COMPARE (tests[i].tm.tm_min, tm->tm_min); in do_test() 131 TEST_COMPARE (tests[i].tm.tm_sec, tm->tm_sec); in do_test() 134 struct tm tms; in do_test() [all …]
|
A D | tst-strptime.c | 95 struct tm tm; in test_tm() local 102 memset (&tm, '\0', sizeof (tm)); in test_tm() 123 buf, tm.tm_wday, tm.tm_yday); in test_tm() 130 if (tm.tm_wday != tm_tests[i].wday) in test_tm() 136 if (tm.tm_yday != tm_tests[i].yday) in test_tm() 151 struct tm tm; in do_test() local 157 memset (&tm, '\0', sizeof (tm)); in do_test() 184 tm.tm_wday, tm.tm_yday, tm.tm_mon, tm.tm_mday); in do_test() 186 if (tm.tm_wday != day_tests[i].wday) in do_test() 192 if (tm.tm_yday != day_tests[i].yday) in do_test() [all …]
|
A D | tst-y2039.c | 34 struct tm *tm = localtime (&ouch); in do_test() local 35 TEST_VERIFY_EXIT (tm != NULL); in do_test() 36 TEST_VERIFY_EXIT (strftime (buf, sizeof buf, "%Y-%m-%d %H:%M:%S %Z", tm) in do_test() 42 struct tm tmd; in do_test() 43 tm = localtime_r (&ouch, &tmd); in do_test() 44 TEST_VERIFY_EXIT (tm == &tmd); in do_test() 46 TEST_VERIFY_EXIT (strftime (buf, sizeof buf, "%Y-%m-%d %H:%M:%S %Z", tm) in do_test()
|
A D | getdate.c | 57 struct tm tm; in first_wday() local 62 memset (&tm, 0, sizeof (struct tm)); in first_wday() 63 tm.tm_year = year; in first_wday() 64 tm.tm_mon = mon; in first_wday() 65 tm.tm_mday = 1; in first_wday() 66 mktime (&tm); in first_wday() 115 struct tm tm; in __getdate_r() local 231 tp->tm_mday = tm.tm_mday + (tp->tm_wday - tm.tm_wday + 7) % 7; in __getdate_r() 242 tp->tm_year = tm.tm_year + (((tp->tm_mon - tm.tm_mon) < 0) ? 1 : 0); in __getdate_r() 272 tp->tm_mday = tm.tm_mday + ((tp->tm_hour - tm.tm_hour) < 0 ? 1 : 0); in __getdate_r() [all …]
|
A D | timegm.c | 30 __timegm64 (struct tm *tmp) in __timegm64() 42 timegm (struct tm *tmp) in libc_hidden_def() 44 struct tm tm = *tmp; in libc_hidden_def() local 45 __time64_t t = __timegm64 (&tm); in libc_hidden_def() 48 *tmp = tm; in libc_hidden_def()
|
A D | localtime.c | 22 struct tm _tmbuf; 27 struct tm * 28 __localtime64_r (const __time64_t *t, struct tm *tp) in __localtime64_r() 37 struct tm * 38 __localtime_r (const time_t *t, struct tm *tp) in __localtime_r() 51 struct tm * in weak_alias() 62 struct tm * in libc_hidden_def()
|
A D | tst-ftime_l.c | 14 struct tm tm; in do_test() local 27 memset (&tm, '\0', sizeof (tm)); in do_test() 29 tm.tm_year = 102; in do_test() 30 tm.tm_mon = 2; in do_test() 31 tm.tm_mday = 1; in do_test() 33 if (strftime (buf, sizeof (buf), "%e %^B %Y", &tm) == 0) in do_test() 48 if (strftime_l (buf, sizeof (buf), "%e %^B %Y", &tm, l) == 0) in do_test() 67 if (wcsftime_l (wbuf, sizeof (wbuf) / sizeof (wbuf[0]), L"%e %^B %Y", &tm, l) in do_test() 88 n = strftime (buf, sizeof (buf), "%e %^B %Y", &tm); in do_test() 111 if (strftime (buf, sizeof (buf), "%e %^B %Y", &tm) == 0) in do_test()
|
A D | mktime.c | 256 static struct tm * 257 convert_time (struct tm *(*convert) (const __time64_t *, struct tm *), in convert_time() argument 258 long_int t, struct tm *tm) in convert_time() argument 269 static struct tm * 270 ranged_convert (struct tm *(*convert) (const __time64_t *, struct tm *), in ranged_convert() argument 322 struct tm *(*convert) (const __time64_t *, struct tm *), in __mktime_internal() argument 325 struct tm tm; in __mktime_internal() local 463 struct tm otm; in __mktime_internal() 514 *tp = tm; in __mktime_internal() 548 struct tm tm = *tp; in libc_hidden_def() local [all …]
|
A D | gmtime.c | 23 struct tm * 24 __gmtime64_r (const __time64_t *t, struct tm *tp) in __gmtime64_r() 35 struct tm * in libc_hidden_def() 36 __gmtime_r (const time_t *t, struct tm *tp) in libc_hidden_def() 48 struct tm * in weak_alias() 60 struct tm * in libc_hidden_def()
|
A D | bug-mktime4.c | 9 equal_tm (struct tm const *t, struct tm const *u) in equal_tm() 39 struct tm tm0 = { .tm_year = INT_MIN, .tm_mday = 1, .tm_wday = -1 }; in do_test() 40 struct tm tm = tm0; in do_test() local 42 time_t t = mktime (&tm); in do_test() 44 bool mktime_failed = tm.tm_wday == tm0.tm_wday; in do_test() 63 if (! equal_tm (&tm, &tm0)) in do_test() 76 struct tm *lt = localtime (&t); in do_test() 82 if (! equal_tm (lt, &tm)) in do_test()
|
A D | tst-strftime3.c | 431 tm_to_printed (struct tm *tm, char *buffer) in tm_to_printed() argument 436 if (0 <= tm->tm_wday && tm->tm_wday <= 6) in tm_to_printed() 454 tm->tm_mon + 1, in tm_to_printed() 455 tm->tm_mday, in tm_to_printed() 456 tm->tm_hour, in tm_to_printed() 457 tm->tm_min, in tm_to_printed() 458 tm->tm_sec, in tm_to_printed() 474 struct tm tm; in do_test() local 475 struct tm tm2; in do_test() 483 tm.tm_mon = d->m; in do_test() [all …]
|
A D | strptime_l.c | 42 static struct tm *localtime_r (const time_t *, struct tm *); 43 static struct tm * 211 day_of_the_week (struct tm *tm) in day_of_the_week() argument 216 int corr_year = 1900 + tm->tm_year - (tm->tm_mon < 2); in day_of_the_week() 229 day_of_the_year (struct tm *tm) in day_of_the_year() argument 231 tm->tm_yday = (__mon_yday[__isleap (1900 + tm->tm_year)][tm->tm_mon] in day_of_the_year() 275 struct tm *tm; in __strptime_internal() local 287 tm = tmp; in __strptime_internal() 813 tm->tm_gmtoff = -tm->tm_gmtoff; in __strptime_internal() 1157 tm->tm_year = tm->tm_year % 100 + (s.century - 19) * 100; in __strptime_internal() [all …]
|
A D | tst-mktime4.c | 23 const struct tm tm0 = 35 const struct tm tmY2038 = 45 const struct tm tm32bitmax = 56 int test_mktime_helper (struct tm *tm, long long int exp_val, int line) in test_mktime_helper() argument 64 result = mktime (tm); in test_mktime_helper() 78 struct tm t; in do_test()
|
A D | strptime.c | 30 strptime (const char *buf, const char *format, struct tm *tm) in strptime() argument 32 return __strptime_internal (buf, format, tm, NULL, _NL_CURRENT_LOCALE); in strptime()
|
A D | time.h | 83 extern time_t mktime (struct tm *__tp) __THROW; 102 const struct tm *__restrict __tp) __THROW; 118 const struct tm *__restrict __tp, 124 const char *__restrict __fmt, struct tm *__tp, 155 struct tm *__restrict __tp) __THROW; 160 struct tm *__restrict __tp) __THROW; 179 extern char *asctime (const struct tm *__tp) __THROW; 249 extern time_t timegm (struct tm *__tp) __THROW; 251 extern time_t timelocal (struct tm *__tp) __THROW; 422 extern struct tm *getdate (const char *__string); [all …]
|
A D | ctime_r.c | 26 struct tm tm; in __ctime64_r() local 27 return __asctime_r (__localtime64_r (t, &tm), buf); in __ctime64_r()
|
A D | tst-mktime.c | 9 struct tm time_str, *tm; in do_test() local 37 tm = localtime (&t); in do_test() 38 if (tm == NULL) in do_test() 45 time_str = *tm; in do_test()
|
A D | tst-timegm.c | 24 do_test_func (time_t (*func)(struct tm *)) in do_test_func() argument 27 struct tm tmg = in do_test_func() 44 struct tm tmg = in do_test_func() 64 struct tm tmg = in do_test_func()
|
A D | tst-gmtime.c | 29 struct tm *tmg = gmtime (&t); in do_test() 43 struct tm tms; in do_test() 44 struct tm *tmg = gmtime_r (&t, &tms); in do_test() 60 struct tm *tmg = gmtime (&t); in do_test() 74 struct tm tms; in do_test() 75 struct tm *tmg = gmtime_r (&t, &tms); in do_test() 93 struct tm *tmg = gmtime (&t); in do_test() 107 struct tm tms; in do_test() 108 struct tm *tmg = gmtime_r (&t, &tms); in do_test()
|
A D | mktime-internal.h | 76 extern __time64_t __mktime_internal (struct tm *tp, 77 struct tm *(*func) (__time64_t const *, 78 struct tm *),
|
A D | asctime.c | 34 asctime_internal (const struct tm *tp, char *buf, size_t buflen) in asctime_internal() 75 __asctime_r (const struct tm *tp, char *buf) in __asctime_r() 85 asctime (const struct tm *tp) in weak_alias()
|
A D | test_time.c | 27 struct tm *tp; in main() 28 struct tm tbuf; in main() 90 struct tm *loctime; in main()
|
A D | tst-mktime3.c | 7 struct tm tests[] = 13 struct tm expected[] =
|