Lines Matching refs:tm
110 static unsigned char *_strptime(const unsigned char *, const char *, struct tm *,
117 strptime(const char *buf, const char *fmt, struct tm *tm) in strptime() argument
122 return (char*)(_strptime((const unsigned char*)buf, fmt, tm, &cr)); in strptime()
126 _strptime(const unsigned char *buf, const char *fmt, struct tm *tm, struct century_relyear *cr) in _strptime() argument
179 if (!(bp = _strptime(bp, _ctloc(d_t_fmt), tm, cr))) in _strptime()
185 if (!(bp = _strptime(bp, "%m/%d/%y", tm, cr))) in _strptime()
191 if (!(bp = _strptime(bp, "%Y-%m-%d", tm, cr))) in _strptime()
197 if (!(bp = _strptime(bp, "%H:%M", tm, cr))) in _strptime()
203 if (!(bp = _strptime(bp, "%I:%M:%S %p", tm, cr))) in _strptime()
209 if (!(bp = _strptime(bp, "%H:%M:%S", tm, cr))) in _strptime()
215 if (!(bp = _strptime(bp, "%e-%b-%Y", tm, cr))) in _strptime()
221 if (!(bp = _strptime(bp, _ctloc(t_fmt), tm, cr))) in _strptime()
227 if (!(bp = _strptime(bp, _ctloc(d_fmt), tm, cr))) in _strptime()
253 tm->tm_wday = i; in _strptime()
277 tm->tm_mon = i; in _strptime()
292 if (!(_conv_num(&bp, &tm->tm_mday, 1, 31))) in _strptime()
301 if (!(_conv_num(&bp, &tm->tm_hour, 0, 23))) in _strptime()
310 if (!(_conv_num(&bp, &tm->tm_hour, 1, 12))) in _strptime()
316 if (!(_conv_num(&bp, &tm->tm_yday, 1, 366))) in _strptime()
318 tm->tm_yday--; in _strptime()
323 if (!(_conv_num(&bp, &tm->tm_min, 0, 59))) in _strptime()
329 if (!(_conv_num(&bp, &tm->tm_mon, 1, 12))) in _strptime()
331 tm->tm_mon--; in _strptime()
340 if (tm->tm_hour > 12) /* i.e., 13:00 AM ?! */ in _strptime()
342 else if (tm->tm_hour == 12) in _strptime()
343 tm->tm_hour = 0; in _strptime()
351 if (tm->tm_hour > 12) /* i.e., 13:00 PM ?! */ in _strptime()
353 else if (tm->tm_hour < 12) in _strptime()
354 tm->tm_hour += 12; in _strptime()
365 if (!(_conv_num(&bp, &tm->tm_sec, 0, 61))) in _strptime()
383 if (localtime_r(&t, tm) == NULL) return NULL; in _strptime()
403 if (!(_conv_num(&bp, &tm->tm_wday, 0, 6))) in _strptime()
411 tm->tm_wday = i % 7; in _strptime()
440 tm->tm_year = i - TM_YEAR_BASE; in _strptime()
452 tm->tm_isdst = 0; in _strptime()
453 tm->tm_gmtoff = 0; in _strptime()
454 tm->tm_zone = gmt; in _strptime()
457 tm->tm_isdst = 0; in _strptime()
458 tm->tm_gmtoff = 0; in _strptime()
459 tm->tm_zone = utc; in _strptime()
468 tm->tm_isdst = i; in _strptime()
469 tm->tm_gmtoff = -(timezone); in _strptime()
470 tm->tm_zone = tzname[i]; in _strptime()
503 tm->tm_isdst = 0; in _strptime()
504 tm->tm_gmtoff = 0; in _strptime()
505 tm->tm_zone = utc; in _strptime()
517 tm->tm_gmtoff = (-5 - i) * SECSPERHOUR; in _strptime()
518 tm->tm_zone = (char *)nast[i]; in _strptime()
524 tm->tm_isdst = 1; in _strptime()
525 tm->tm_gmtoff = (-4 - i) * SECSPERHOUR; in _strptime()
526 tm->tm_zone = (char *)nadt[i]; in _strptime()
546 tm->tm_isdst = 0; /* XXX */ in _strptime()
547 tm->tm_gmtoff = offs; in _strptime()
548 tm->tm_zone = NULL; /* XXX */ in _strptime()
576 tm->tm_year = cr->relyear + 2000 - TM_YEAR_BASE; in _strptime()
578 tm->tm_year = cr->relyear + 1900 - TM_YEAR_BASE; in _strptime()
580 tm->tm_year = cr->relyear + cr->century - TM_YEAR_BASE; in _strptime()
632 char* strptime_l(const char* buf, const char* fmt, struct tm* tm, locale_t l) { in strptime_l() argument
633 return strptime(buf, fmt, tm); in strptime_l()