Lines Matching full:tm

57 static	char *_strptime(const char *, const char *, struct tm *, int);
61 strptime(const char *buf, const char *fmt, struct tm *tm) in strptime() argument
63 return(_strptime(buf, fmt, tm, 1)); in strptime()
67 _strptime(const char *buf, const char *fmt, struct tm *tm, int initialize) in _strptime() argument
126 if (!(bp = _strptime(bp, _ctloc(d_t_fmt), tm, 0))) in _strptime()
132 if (!(bp = _strptime(bp, "%m/%d/%y", tm, 0))) in _strptime()
138 if (!(bp = _strptime(bp, "%H:%M", tm, 0))) in _strptime()
144 if (!(bp = _strptime(bp, "%I:%M:%S %p", tm, 0))) in _strptime()
150 if (!(bp = _strptime(bp, "%H:%M:%S", tm, 0))) in _strptime()
156 if (!(bp = _strptime(bp, _ctloc(t_fmt), tm, 0))) in _strptime()
162 if (!(bp = _strptime(bp, _ctloc(d_fmt), tm, 0))) in _strptime()
189 tm->tm_wday = i; in _strptime()
213 tm->tm_mon = i; in _strptime()
229 if (!(_conv_num(&bp, &tm->tm_mday, 1, 31))) in _strptime()
238 if (!(_conv_num(&bp, &tm->tm_hour, 0, 23))) in _strptime()
247 if (!(_conv_num(&bp, &tm->tm_hour, 1, 12))) in _strptime()
253 if (!(_conv_num(&bp, &tm->tm_yday, 1, 366))) in _strptime()
255 tm->tm_yday--; in _strptime()
260 if (!(_conv_num(&bp, &tm->tm_min, 0, 59))) in _strptime()
266 if (!(_conv_num(&bp, &tm->tm_mon, 1, 12))) in _strptime()
268 tm->tm_mon--; in _strptime()
277 if (tm->tm_hour > 12) /* i.e., 13:00 AM ?! */ in _strptime()
279 else if (tm->tm_hour == 12) in _strptime()
280 tm->tm_hour = 0; in _strptime()
288 if (tm->tm_hour > 12) /* i.e., 13:00 PM ?! */ in _strptime()
290 else if (tm->tm_hour < 12) in _strptime()
291 tm->tm_hour += 12; in _strptime()
302 if (!(_conv_num(&bp, &tm->tm_sec, 0, 61))) in _strptime()
311 * information present in the tm structure at this in _strptime()
321 if (!(_conv_num(&bp, &tm->tm_wday, 0, 6))) in _strptime()
331 tm->tm_year = i - TM_YEAR_BASE; in _strptime()
365 tm->tm_year = relyear + 2000 - TM_YEAR_BASE; in _strptime()
367 tm->tm_year = relyear + 1900 - TM_YEAR_BASE; in _strptime()
369 tm->tm_year = relyear + century - TM_YEAR_BASE; in _strptime()