Lines Matching full:tm
286 plus_or_minus(struct tm *tm, int delay) in plus_or_minus() argument
294 tm->tm_year += delay; in plus_or_minus()
297 tm->tm_mon += delay; in plus_or_minus()
302 tm->tm_mday += delay; in plus_or_minus()
305 tm->tm_hour += delay; in plus_or_minus()
308 tm->tm_min += delay; in plus_or_minus()
318 tm->tm_isdst = -1; in plus_or_minus()
319 if (mktime(tm) < 0) in plus_or_minus()
331 plus(struct tm *tm) in plus() argument
338 plus_or_minus(tm, delay); in plus()
346 minus(struct tm *tm) in minus() argument
353 plus_or_minus(tm, delay); in minus()
362 tod(struct tm *tm) in tod() argument
410 tm->tm_hour > hour) { in tod()
411 tm->tm_mday++; in tod()
412 tm->tm_wday++; in tod()
415 tm->tm_hour = hour; in tod()
416 tm->tm_min = minute; in tod()
417 if (tm->tm_hour == 24) { in tod()
418 tm->tm_hour = 0; in tod()
419 tm->tm_mday++; in tod()
428 assign_date(struct tm *tm, long mday, long mon, long year) in assign_date() argument
440 struct tm *lt; in assign_date()
456 (tm->tm_mon > mon ||(tm->tm_mon == mon && tm->tm_mday > mday))) in assign_date()
457 year = tm->tm_year + 1; in assign_date()
459 tm->tm_mday = mday; in assign_date()
460 tm->tm_mon = mon; in assign_date()
463 tm->tm_year = year; in assign_date()
477 month(struct tm *tm) in month() argument
485 plus(tm); in month()
488 minus(tm); in month()
493 tm->tm_mday ++; in month()
494 tm->tm_wday ++; in month()
510 assign_date(tm, mday, mon, year); in month()
520 mday = tm->tm_mday; in month()
524 if (wday < tm->tm_wday) in month()
525 mday += 7 - (tm->tm_wday - wday); in month()
527 mday += (wday - tm->tm_wday); in month()
529 tm->tm_wday = wday; in month()
531 assign_date(tm, mday, tm->tm_mon, tm->tm_year); in month()
580 assign_date(tm, mday, mon, year); in month()
595 struct tm nowtime, runtime; in parsetime()