Lines Matching refs:tm
53 static char * _strptime(const char *, const char *, struct tm *, int *, locale_t);
79 _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, in _strptime() argument
125 buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); in _strptime()
150 buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); in _strptime()
157 buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); in _strptime()
176 buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); in _strptime()
183 buf = _strptime(buf, "%H:%M", tm, GMTp, locale); in _strptime()
189 buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); in _strptime()
195 buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); in _strptime()
201 buf = _strptime(buf, tptr->X_fmt, tm, GMTp, locale); in _strptime()
207 buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); in _strptime()
227 tm->tm_yday = i - 1; in _strptime()
252 tm->tm_min = i; in _strptime()
256 tm->tm_sec = i; in _strptime()
296 tm->tm_hour = i; in _strptime()
305 if (tm->tm_hour > 12) in _strptime()
310 if (tm->tm_hour == 12) in _strptime()
311 tm->tm_hour = 0; in _strptime()
318 if (tm->tm_hour != 12) in _strptime()
319 tm->tm_hour += 12; in _strptime()
342 tm->tm_wday = i; in _strptime()
387 tm->tm_wday = i % 7; in _strptime()
424 tm->tm_mday = i; in _strptime()
463 tm->tm_mon = i; in _strptime()
483 tm->tm_mon = i - 1; in _strptime()
504 if (gmtime_r(&t, tm) == NULL) in _strptime()
553 tm->tm_isdst = 0; in _strptime()
555 tm->tm_isdst = 1; in _strptime()
592 tm->tm_hour -= sign * (i / 100); in _strptime()
593 tm->tm_min -= sign * (i % 100); in _strptime()
617 tm->tm_year = year; in _strptime()
623 tm->tm_yday = start_of_month[isleap(tm->tm_year + in _strptime()
624 TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); in _strptime()
629 fwo = first_wday_of(tm->tm_year + TM_YEAR_BASE); in _strptime()
637 tmpwday = (flags & FLAG_WDAY) ? tm->tm_wday : in _strptime()
648 tm->tm_yday = tmpyday; in _strptime()
656 while (tm->tm_yday >= in _strptime()
657 start_of_month[isleap(tm->tm_year + in _strptime()
662 tm->tm_yday -= in _strptime()
663 start_of_month[isleap(tm->tm_year + in _strptime()
665 tm->tm_year++; in _strptime()
667 tm->tm_mon = i - 1; in _strptime()
671 tm->tm_mday = tm->tm_yday - in _strptime()
672 start_of_month[isleap(tm->tm_year + TM_YEAR_BASE)] in _strptime()
673 [tm->tm_mon] + 1; in _strptime()
678 wday_offset = first_wday_of(tm->tm_year); in _strptime()
679 while (i++ <= tm->tm_yday) { in _strptime()
683 tm->tm_wday = wday_offset; in _strptime()
693 struct tm * __restrict tm, locale_t loc) in strptime_l() argument
700 ret = _strptime(buf, fmt, tm, &gmt, loc); in strptime_l()
702 time_t t = timegm(tm); in strptime_l()
704 localtime_r(&t, tm); in strptime_l()
712 struct tm * __restrict tm) in strptime() argument
714 return strptime_l(buf, fmt, tm, __get_locale()); in strptime()