Lines Matching refs:tm

526 static struct tm _tmbuf;
528 struct tm *gmtime(when)
556 struct tm *localtime(when)
561 struct tm *ret;
581 struct tm *tb;
583 time_t localt; /* time_t equivalent of given tm struct */
624 of the local time and date in the exploded time structure `tm',
625 adjust out of range fields in `tm' and set `tm->tm_yday', `tm->tm_wday'.
626 If `tm->tm_isdst < 0' was passed to mktime(), the correct setting of
630 Return -1 if time in `tm' cannot be represented as time_t value. */
632 time_t mktime(tm)
633 struct tm *tm;
635 struct tm *ltm; /* Local time. */
640 int save_isdst; /* Copy of the tm->isdst input value */
642 save_isdst = tm->tm_isdst;
643 loctime = mkgmtime(tm);
645 tm->tm_isdst = save_isdst;
652 savings time occurs between when it is the time in `tm' locally
660 if (ltm == (struct tm *)NULL ||
666 if (ltm == (struct tm *)NULL || tzoffset_adj != 0L) {
668 tm->tm_isdst = save_isdst;
690 if (tm != ltm) /* `tm' may already point to localtime's internal storage */
691 *tm = *ltm;
699 These are the result of the decomposition into a `struct tm' for
722 /* Adjusts out-of-range values for `tm' field `tm_member'. */
733 of the Greenwich Mean time and date in the exploded time structure `tm'.
734 This function does always put back normalized values into the `tm' struct,
735 parameter, including the calculated numbers for `tm->tm_yday',
736 `tm->tm_wday', and `tm->tm_isdst'.
737 Returns -1 if the time in the `tm' parameter cannot be represented
740 time_t mkgmtime(tm)
741 struct tm *tm;
745 years = tm->tm_year + TM_YEAR_BASE; /* year - 1900 -> year */
746 months = tm->tm_mon; /* 0..11 */
747 days = tm->tm_mday - 1; /* 1..31 -> 0..30 */
748 hours = tm->tm_hour; /* 0..23 */
749 minutes = tm->tm_min; /* 0..59 */
750 seconds = tm->tm_sec; /* 0..61 in ANSI C. */
773 /* Restore adjusted values in tm structure */
774 tm->tm_year = years - TM_YEAR_BASE;
775 tm->tm_mon = months;
776 tm->tm_mday = days + 1;
777 tm->tm_hour = hours;
778 tm->tm_min = minutes;
779 tm->tm_sec = seconds;
783 tm->tm_yday = days;
788 tm->tm_wday = ((unsigned)days + EPOCH_WDAY) % 7;
789 tm->tm_isdst = 0;
798 (tm->tm_yday > (YDAYS(TM_MON_MAX, TM_YEAR_MAX) + (TM_MDAY_MAX - 1)) ||
799 (tm->tm_yday == (YDAYS(TM_MON_MAX, TM_YEAR_MAX) + (TM_MDAY_MAX - 1)) &&