Lines Matching refs:tm
61 static char * _strptime(const char *, const char *, struct tm *, int *, locale_t);
87 _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, in _strptime() argument
133 buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); in _strptime()
158 buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); in _strptime()
165 buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); in _strptime()
184 buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); in _strptime()
191 buf = _strptime(buf, "%H:%M", tm, GMTp, locale); in _strptime()
197 buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); in _strptime()
203 buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); in _strptime()
209 buf = _strptime(buf, tptr->X_fmt, tm, GMTp, locale); in _strptime()
215 buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); in _strptime()
235 tm->tm_yday = i - 1; in _strptime()
260 tm->tm_min = i; in _strptime()
264 tm->tm_sec = i; in _strptime()
304 tm->tm_hour = i; in _strptime()
313 if (tm->tm_hour > 12) in _strptime()
318 if (tm->tm_hour == 12) in _strptime()
319 tm->tm_hour = 0; in _strptime()
326 if (tm->tm_hour != 12) in _strptime()
327 tm->tm_hour += 12; in _strptime()
350 tm->tm_wday = i; in _strptime()
395 tm->tm_wday = i % 7; in _strptime()
432 tm->tm_mday = i; in _strptime()
471 tm->tm_mon = i; in _strptime()
491 tm->tm_mon = i - 1; in _strptime()
512 if (gmtime_r(&t, tm) == NULL) in _strptime()
561 tm->tm_isdst = 0; in _strptime()
563 tm->tm_isdst = 1; in _strptime()
600 tm->tm_hour -= sign * (i / 100); in _strptime()
601 tm->tm_min -= sign * (i % 100); in _strptime()
625 tm->tm_year = year; in _strptime()
631 tm->tm_yday = start_of_month[isleap(tm->tm_year + in _strptime()
632 TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); in _strptime()
637 fwo = first_wday_of(tm->tm_year + TM_YEAR_BASE); in _strptime()
645 tmpwday = (flags & FLAG_WDAY) ? tm->tm_wday : in _strptime()
656 tm->tm_yday = tmpyday; in _strptime()
664 while (tm->tm_yday >= in _strptime()
665 start_of_month[isleap(tm->tm_year + in _strptime()
670 tm->tm_yday -= in _strptime()
671 start_of_month[isleap(tm->tm_year + in _strptime()
673 tm->tm_year++; in _strptime()
675 tm->tm_mon = i - 1; in _strptime()
679 tm->tm_mday = tm->tm_yday - in _strptime()
680 start_of_month[isleap(tm->tm_year + TM_YEAR_BASE)] in _strptime()
681 [tm->tm_mon] + 1; in _strptime()
686 wday_offset = first_wday_of(tm->tm_year); in _strptime()
687 while (i++ <= tm->tm_yday) { in _strptime()
691 tm->tm_wday = wday_offset; in _strptime()
701 struct tm * __restrict tm, locale_t loc) in strptime_l() argument
708 ret = _strptime(buf, fmt, tm, &gmt, loc); in strptime_l()
710 time_t t = timegm(tm); in strptime_l()
712 localtime_r(&t, tm); in strptime_l()
720 struct tm * __restrict tm) in strptime() argument
722 return strptime_l(buf, fmt, tm, __get_locale()); in strptime()