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