Lines Matching refs:tm

44 void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)  in timelib_unixtime2gmt()  argument
127 tm->y = cur_year; in timelib_unixtime2gmt()
128 tm->m = i + 1; in timelib_unixtime2gmt()
129 tm->d = tmp_days - months[i]; in timelib_unixtime2gmt()
130 tm->h = hours; in timelib_unixtime2gmt()
131 tm->i = minutes; in timelib_unixtime2gmt()
132 tm->s = seconds; in timelib_unixtime2gmt()
133 tm->z = 0; in timelib_unixtime2gmt()
134 tm->dst = 0; in timelib_unixtime2gmt()
135 tm->sse = ts; in timelib_unixtime2gmt()
136 tm->sse_uptodate = 1; in timelib_unixtime2gmt()
137 tm->tim_uptodate = 1; in timelib_unixtime2gmt()
138 tm->is_localtime = 0; in timelib_unixtime2gmt()
141 void timelib_update_from_sse(timelib_time *tm) in timelib_update_from_sse() argument
144 int z = tm->z; in timelib_update_from_sse()
145 signed int dst = tm->dst; in timelib_update_from_sse()
147 sse = tm->sse; in timelib_update_from_sse()
149 switch (tm->zone_type) { in timelib_update_from_sse()
152 timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60) + (tm->dst * 3600)); in timelib_update_from_sse()
160 gmt_offset = timelib_get_time_zone_info(tm->sse, tm->tz_info); in timelib_update_from_sse()
161 timelib_unixtime2gmt(tm, tm->sse + gmt_offset->offset); in timelib_update_from_sse()
168 timelib_unixtime2gmt(tm, tm->sse); in timelib_update_from_sse()
172 tm->sse = sse; in timelib_update_from_sse()
173 tm->is_localtime = 1; in timelib_update_from_sse()
174 tm->have_zone = 1; in timelib_update_from_sse()
175 tm->z = z; in timelib_update_from_sse()
176 tm->dst = dst; in timelib_update_from_sse()
179 void timelib_unixtime2local(timelib_time *tm, timelib_sll ts) in timelib_unixtime2local() argument
182 timelib_tzinfo *tz = tm->tz_info; in timelib_unixtime2local()
184 switch (tm->zone_type) { in timelib_unixtime2local()
187 int z = tm->z; in timelib_unixtime2local()
188 signed int dst = tm->dst; in timelib_unixtime2local()
190 timelib_unixtime2gmt(tm, ts - (tm->z * 60) + (tm->dst * 3600)); in timelib_unixtime2local()
192 tm->sse = ts; in timelib_unixtime2local()
193 tm->z = z; in timelib_unixtime2local()
194 tm->dst = dst; in timelib_unixtime2local()
200 timelib_unixtime2gmt(tm, ts + gmt_offset->offset); in timelib_unixtime2local()
203 tm->sse = ts; in timelib_unixtime2local()
204 tm->dst = gmt_offset->is_dst; in timelib_unixtime2local()
205 tm->z = gmt_offset->offset; in timelib_unixtime2local()
206 tm->tz_info = tz; in timelib_unixtime2local()
208 timelib_time_tz_abbr_update(tm, gmt_offset->abbr); in timelib_unixtime2local()
213 tm->is_localtime = 0; in timelib_unixtime2local()
214 tm->have_zone = 0; in timelib_unixtime2local()
218 tm->is_localtime = 1; in timelib_unixtime2local()
219 tm->have_zone = 1; in timelib_unixtime2local()