Lines Matching refs:tm

99 static  unsigned char *_strptime(const unsigned char *, const char *, struct tm *,
104 strptime(const char *buf, const char *fmt, struct tm *tm) in strptime() argument
109 return (char*)(_strptime((const unsigned char*)buf, fmt, tm, &cr)); in strptime()
113 _strptime(const unsigned char *buf, const char *fmt, struct tm *tm, struct century_relyear *cr) in _strptime() argument
165 if (!(bp = _strptime(bp, _ctloc(d_t_fmt), tm, cr))) in _strptime()
171 if (!(bp = _strptime(bp, "%m/%d/%y", tm, cr))) in _strptime()
177 if (!(bp = _strptime(bp, "%Y-%m-%d", tm, cr))) in _strptime()
183 if (!(bp = _strptime(bp, "%H:%M", tm, cr))) in _strptime()
189 if (!(bp = _strptime(bp, "%I:%M:%S %p", tm, cr))) in _strptime()
195 if (!(bp = _strptime(bp, "%H:%M:%S", tm, cr))) in _strptime()
201 if (!(bp = _strptime(bp, "%e-%b-%Y", tm, cr))) in _strptime()
207 if (!(bp = _strptime(bp, _ctloc(t_fmt), tm, cr))) in _strptime()
213 if (!(bp = _strptime(bp, _ctloc(d_fmt), tm, cr))) in _strptime()
239 tm->tm_wday = i; in _strptime()
263 tm->tm_mon = i; in _strptime()
278 if (!(_conv_num(&bp, &tm->tm_mday, 1, 31))) in _strptime()
287 if (!(_conv_num(&bp, &tm->tm_hour, 0, 23))) in _strptime()
296 if (!(_conv_num(&bp, &tm->tm_hour, 1, 12))) in _strptime()
302 if (!(_conv_num(&bp, &tm->tm_yday, 1, 366))) in _strptime()
304 tm->tm_yday--; in _strptime()
309 if (!(_conv_num(&bp, &tm->tm_min, 0, 59))) in _strptime()
315 if (!(_conv_num(&bp, &tm->tm_mon, 1, 12))) in _strptime()
317 tm->tm_mon--; in _strptime()
326 if (tm->tm_hour > 12) /* i.e., 13:00 AM ?! */ in _strptime()
328 else if (tm->tm_hour == 12) in _strptime()
329 tm->tm_hour = 0; in _strptime()
337 if (tm->tm_hour > 12) /* i.e., 13:00 PM ?! */ in _strptime()
339 else if (tm->tm_hour < 12) in _strptime()
340 tm->tm_hour += 12; in _strptime()
351 if (!(_conv_num(&bp, &tm->tm_sec, 0, 61))) in _strptime()
369 if (localtime_r(&t, tm) == NULL) return NULL; in _strptime()
389 if (!(_conv_num(&bp, &tm->tm_wday, 0, 6))) in _strptime()
397 tm->tm_wday = i % 7; in _strptime()
426 tm->tm_year = i - TM_YEAR_BASE; in _strptime()
460 tm->tm_year = cr->relyear + 2000 - TM_YEAR_BASE; in _strptime()
462 tm->tm_year = cr->relyear + 1900 - TM_YEAR_BASE; in _strptime()
464 tm->tm_year = cr->relyear + cr->century - TM_YEAR_BASE; in _strptime()
495 char* strptime_l(const char* buf, const char* fmt, struct tm* tm, locale_t l) { in strptime_l() argument
496 return strptime(buf, fmt, tm); in strptime_l()