Lines Matching refs:tm

72 	struct tm	 basetm;	/* Base Time expanded into fields */
73 struct tm tm; /* Time expanded into fields */ member
131 struct tm tm; in parse8601() local
142 tm = ptime->tm; in parse8601()
146 tm.tm_year = ((l / 1000000) - 19) * 100; in parse8601()
151 tm.tm_year -= tm.tm_year % 100; in parse8601()
152 tm.tm_year += l / 10000; in parse8601()
157 tm.tm_mon = (l / 100) - 1; in parse8601()
162 tm.tm_mday = l; in parse8601()
171 if (tm.tm_year < 70 || tm.tm_mon < 0 || tm.tm_mon > 12 in parse8601()
172 || tm.tm_mday < 1 || tm.tm_mday > 31) in parse8601()
183 tm.tm_sec = l % 100; in parse8601()
187 tm.tm_min = l % 100; in parse8601()
192 tm.tm_hour = l; in parse8601()
201 if (tm.tm_sec < 0 || tm.tm_sec > 60 || tm.tm_min < 0 in parse8601()
202 || tm.tm_min > 59 || tm.tm_hour < 0 || tm.tm_hour > 23) in parse8601()
206 ptime->tm = tm; in parse8601()
231 struct tm tm; in parseDWM() local
234 tm = ptime->tm; in parseDWM()
235 daysmon = days_pmonth(tm.tm_mon, tm.tm_year); in parseDWM()
252 tm.tm_hour = l; in parseDWM()
265 if (l != tm.tm_wday) { in parseDWM()
268 if (l < tm.tm_wday) { in parseDWM()
269 save = 6 - tm.tm_wday; in parseDWM()
272 save = l - tm.tm_wday; in parseDWM()
275 tm.tm_mday += save; in parseDWM()
277 if (tm.tm_mday > daysmon) { in parseDWM()
278 tm.tm_mon++; in parseDWM()
279 tm.tm_mday = tm.tm_mday - daysmon; in parseDWM()
280 if (tm.tm_mon >= 12) { in parseDWM()
281 tm.tm_mon = 0; in parseDWM()
282 tm.tm_year++; in parseDWM()
297 tm.tm_mday = daysmon; in parseDWM()
307 tm.tm_mday = l; in parseDWM()
324 ptime->tm = tm; in parseDWM()
367 (adjtime.did_adj4dst == dstsrc->tm.tm_isdst)) in ptime_adjust4dst()
371 if (dstsrc->tm.tm_isdst != adjtime.tm.tm_isdst) { in ptime_adjust4dst()
372 if (adjtime.tm.tm_isdst == 1) in ptime_adjust4dst()
374 else if (adjtime.tm.tm_isdst == 0) in ptime_adjust4dst()
376 adjtime.tm = *(localtime(&adjtime.tsecs)); in ptime_adjust4dst()
378 adjtime.did_adj4dst = dstsrc->tm.tm_isdst; in ptime_adjust4dst()
395 struct tm temp_tm; in ptime_relparse()
400 ptime->tm = ptime->basetm; in ptime_relparse()
401 ptime->tm.tm_hour = ptime->tm.tm_min = ptime->tm.tm_sec = 0; in ptime_relparse()
424 dpm = days_pmonth(ptime->tm.tm_mon, ptime->tm.tm_year); in ptime_relparse()
427 (ptime->tm.tm_mday> dpm)) { in ptime_relparse()
436 ptime->tm.tm_year, ptime->tm.tm_mon, in ptime_relparse()
437 ptime->tm.tm_mday, ptime->tm.tm_hour, in ptime_relparse()
438 ptime->tm.tm_min, dpm); in ptime_relparse()
439 temp_tm = ptime->tm; in ptime_relparse()
446 ptime->tm.tm_year, ptime->tm.tm_mon, in ptime_relparse()
447 ptime->tm.tm_mday, ptime->tm.tm_hour, in ptime_relparse()
448 ptime->tm.tm_min); in ptime_relparse()
456 ptime->tsecs = mktime(&ptime->tm); in ptime_relparse()
503 struct tm tm; in ptimeget_ctime_rfc5424() local
522 if (ptime == NULL || localtime_r(&(ptime->tsecs), &tm) == NULL) { in ptimeget_ctime_rfc5424()
532 if (tm.tm_gmtoff < 0) { in ptimeget_ctime_rfc5424()
534 tz_offset = -tm.tm_gmtoff; in ptimeget_ctime_rfc5424()
537 tz_offset = tm.tm_gmtoff; in ptimeget_ctime_rfc5424()
547 tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, in ptimeget_ctime_rfc5424()
548 tm.tm_hour, tm.tm_min, tm.tm_sec, in ptimeget_ctime_rfc5424()
617 if (ptime->tm.tm_mon == 1 && ptime->tm.tm_mday == 29) { in ptimeset_nxtime()
618 nextmatch.tm.tm_year += 4; in ptimeset_nxtime()
619 if (days_pmonth(1, nextmatch.tm.tm_year) < 29) in ptimeset_nxtime()
620 nextmatch.tm.tm_year += 4; in ptimeset_nxtime()
622 nextmatch.tm.tm_year += 1; in ptimeset_nxtime()
624 nextmatch.tm.tm_isdst = -1; in ptimeset_nxtime()
625 nextmatch.tsecs = mktime(&nextmatch.tm); in ptimeset_nxtime()
633 if (ptime->tm.tm_mon < 11) in ptimeset_nxtime()
634 moredays = days_pmonth(ptime->tm.tm_mon + 1, in ptimeset_nxtime()
635 ptime->tm.tm_year); in ptimeset_nxtime()
637 moredays = days_pmonth(0, ptime->tm.tm_year + 1); in ptimeset_nxtime()
641 moredays = days_pmonth(ptime->tm.tm_mon, ptime->tm.tm_year); in ptimeset_nxtime()
647 tmon = ptime->tm.tm_mon; in ptimeset_nxtime()
648 tyear = ptime->tm.tm_year; in ptimeset_nxtime()
657 if (tdpm >= ptime->tm.tm_mday) in ptimeset_nxtime()
670 nextmatch.tm = *(localtime(&nextmatch.tsecs)); in ptimeset_nxtime()
692 ptime->tm = *(localtime(&ptime->tsecs)); in ptimeset_time()