Lines Matching defs:tm
40 tmxtm(register Tm_t* tm, Time_t t, Tm_zone_t* zone)
42 register struct tm* tp;
68 if (!(tm->tm_zone = zone))
71 tm->tm_zone = &tm_data.zone[2];
73 tm->tm_zone = tm_info.zone;
75 if ((o = 60 * tm->tm_zone->west) && x > o)
84 tm->tm_sec = n % 60 + leapsec;
86 tm->tm_min = n % 60;
88 tm->tm_hour = n % 24;
91 tm->tm_sec = x % 60 + leapsec;
93 tm->tm_min = x % 60;
95 tm->tm_hour = x % 24;
98 tm->tm_wday = (x + 4) % 7;
99 tm->tm_year = (400 * (x + 25202)) / 146097 + 1;
100 n = tm->tm_year - 1;
102 tm->tm_mon = 0;
103 tm->tm_mday = x + 1;
104 tm->tm_nsec = tmxnsec(t);
105 tmfix(tm);
107 tm->tm_isdst = 0;
108 if (tm->tm_zone->daylight)
110 if ((y = tmequiv(tm) - 1900) == tm->tm_year)
116 te = *tm;
118 now = tmxsec(tmxtime(&te, tm->tm_zone->west));
120 if ((tp = tmlocaltime(&now)) && ((tm->tm_isdst = tp->tm_isdst) || o))
122 tm->tm_min -= o / 60 + (tm->tm_isdst ? tm->tm_zone->dst : 0);
123 tmfix(tm);
126 return tm;