Lines Matching refs:lt

103 	struct tm *lt;  in main()  local
201 lt = localtime(&ts.tv_sec); in main()
202 if (lt == NULL) in main()
204 badv = vary_apply(v, lt); in main()
214 printisodate(lt, ts.tv_nsec); in main()
224 (void)strftime_ns(buf, sizeof(buf), format, lt, ts.tv_nsec); in main()
238 printisodate(struct tm *lt, long nsec) in printisodate() argument
247 (void)strftime_ns(buf, sizeof(buf), fmtbuf, lt, nsec); in printisodate()
250 (void)strftime_ns(tzbuf, sizeof(tzbuf), "%z", lt, nsec); in printisodate()
265 struct tm *lt; in setthetime() local
269 lt = localtime(&ts->tv_sec); in setthetime()
270 if (lt == NULL) in setthetime()
272 lt->tm_isdst = -1; /* divine correct DST */ in setthetime()
275 t = strptime(p, fmt, lt); in setthetime()
299 lt->tm_sec = ATOI2(dot); in setthetime()
300 if (lt->tm_sec > 61) in setthetime()
303 lt->tm_sec = 0; in setthetime()
309 lt->tm_year = ATOI2(p) * 100 - TM_YEAR_BASE; in setthetime()
314 lt->tm_year += ATOI2(p); in setthetime()
316 lt->tm_year = ATOI2(p); in setthetime()
317 if (lt->tm_year < 69) /* hack for 2000 ;-} */ in setthetime()
318 lt->tm_year += 2000 - TM_YEAR_BASE; in setthetime()
320 lt->tm_year += 1900 - TM_YEAR_BASE; in setthetime()
324 lt->tm_mon = ATOI2(p); in setthetime()
325 if (lt->tm_mon > 12) in setthetime()
327 --lt->tm_mon; /* time struct is 0 - 11 */ in setthetime()
330 lt->tm_mday = ATOI2(p); in setthetime()
331 if (lt->tm_mday > 31) in setthetime()
335 lt->tm_hour = ATOI2(p); in setthetime()
336 if (lt->tm_hour > 23) in setthetime()
340 lt->tm_min = ATOI2(p); in setthetime()
341 if (lt->tm_min > 59) in setthetime()
350 lt->tm_yday = -1; in setthetime()
351 ts->tv_sec = mktime(lt); in setthetime()
352 if (lt->tm_yday == -1) in setthetime()