Lines Matching refs:tm
62 static char * _strptime(const char *, const char *, struct tm *, int *, locale_t);
88 _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, in _strptime() argument
134 buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); in _strptime()
159 buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); in _strptime()
166 buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); in _strptime()
185 buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); in _strptime()
192 buf = _strptime(buf, "%H:%M", tm, GMTp, locale); in _strptime()
198 buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); in _strptime()
204 buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); in _strptime()
210 buf = _strptime(buf, tptr->X_fmt, tm, GMTp, locale); in _strptime()
216 buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); in _strptime()
236 tm->tm_yday = i - 1; in _strptime()
261 tm->tm_min = i; in _strptime()
265 tm->tm_sec = i; in _strptime()
305 tm->tm_hour = i; in _strptime()
314 if (tm->tm_hour > 12) in _strptime()
319 if (tm->tm_hour == 12) in _strptime()
320 tm->tm_hour = 0; in _strptime()
327 if (tm->tm_hour != 12) in _strptime()
328 tm->tm_hour += 12; in _strptime()
351 tm->tm_wday = i; in _strptime()
396 tm->tm_wday = i % 7; in _strptime()
433 tm->tm_mday = i; in _strptime()
472 tm->tm_mon = i; in _strptime()
492 tm->tm_mon = i - 1; in _strptime()
513 if (gmtime_r(&t, tm) == NULL) in _strptime()
562 tm->tm_isdst = 0; in _strptime()
564 tm->tm_isdst = 1; in _strptime()
601 tm->tm_hour -= sign * (i / 100); in _strptime()
602 tm->tm_min -= sign * (i % 100); in _strptime()
626 tm->tm_year = year; in _strptime()
632 tm->tm_yday = start_of_month[isleap(tm->tm_year + in _strptime()
633 TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); in _strptime()
638 fwo = first_wday_of(tm->tm_year + TM_YEAR_BASE); in _strptime()
646 tmpwday = (flags & FLAG_WDAY) ? tm->tm_wday : in _strptime()
657 tm->tm_yday = tmpyday; in _strptime()
665 while (tm->tm_yday >= in _strptime()
666 start_of_month[isleap(tm->tm_year + in _strptime()
671 tm->tm_yday -= in _strptime()
672 start_of_month[isleap(tm->tm_year + in _strptime()
674 tm->tm_year++; in _strptime()
676 tm->tm_mon = i - 1; in _strptime()
680 tm->tm_mday = tm->tm_yday - in _strptime()
681 start_of_month[isleap(tm->tm_year + TM_YEAR_BASE)] in _strptime()
682 [tm->tm_mon] + 1; in _strptime()
687 wday_offset = first_wday_of(tm->tm_year); in _strptime()
688 while (i++ <= tm->tm_yday) { in _strptime()
692 tm->tm_wday = wday_offset; in _strptime()
702 struct tm * __restrict tm, locale_t loc) in strptime_l() argument
709 ret = _strptime(buf, fmt, tm, &gmt, loc); in strptime_l()
711 time_t t = timegm(tm); in strptime_l()
713 localtime_r(&t, tm); in strptime_l()
721 struct tm * __restrict tm) in strptime() argument
723 return strptime_l(buf, fmt, tm, __get_locale()); in strptime()