Lines Matching refs:tm

40 void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)  in timelib_unixtime2gmt()  argument
123 tm->y = cur_year; in timelib_unixtime2gmt()
124 tm->m = i + 1; in timelib_unixtime2gmt()
125 tm->d = tmp_days - months[i]; in timelib_unixtime2gmt()
126 tm->h = hours; in timelib_unixtime2gmt()
127 tm->i = minutes; in timelib_unixtime2gmt()
128 tm->s = seconds; in timelib_unixtime2gmt()
129 tm->z = 0; in timelib_unixtime2gmt()
130 tm->dst = 0; in timelib_unixtime2gmt()
131 tm->sse = ts; in timelib_unixtime2gmt()
132 tm->sse_uptodate = 1; in timelib_unixtime2gmt()
133 tm->tim_uptodate = 1; in timelib_unixtime2gmt()
134 tm->is_localtime = 0; in timelib_unixtime2gmt()
137 void timelib_update_from_sse(timelib_time *tm) in timelib_update_from_sse() argument
140 int z = tm->z; in timelib_update_from_sse()
141 signed int dst = tm->dst; in timelib_update_from_sse()
143 sse = tm->sse; in timelib_update_from_sse()
145 switch (tm->zone_type) { in timelib_update_from_sse()
148 timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60) + (tm->dst * 3600)); in timelib_update_from_sse()
156 gmt_offset = timelib_get_time_zone_info(tm->sse, tm->tz_info); in timelib_update_from_sse()
157 timelib_unixtime2gmt(tm, tm->sse + gmt_offset->offset); in timelib_update_from_sse()
164 timelib_unixtime2gmt(tm, tm->sse); in timelib_update_from_sse()
168 tm->sse = sse; in timelib_update_from_sse()
169 tm->is_localtime = 1; in timelib_update_from_sse()
170 tm->have_zone = 1; in timelib_update_from_sse()
171 tm->z = z; in timelib_update_from_sse()
172 tm->dst = dst; in timelib_update_from_sse()
175 void timelib_unixtime2local(timelib_time *tm, timelib_sll ts) in timelib_unixtime2local() argument
178 timelib_tzinfo *tz = tm->tz_info; in timelib_unixtime2local()
180 switch (tm->zone_type) { in timelib_unixtime2local()
183 int z = tm->z; in timelib_unixtime2local()
184 signed int dst = tm->dst; in timelib_unixtime2local()
186 timelib_unixtime2gmt(tm, ts - (tm->z * 60) + (tm->dst * 3600)); in timelib_unixtime2local()
188 tm->z = z; in timelib_unixtime2local()
189 tm->dst = dst; in timelib_unixtime2local()
195 timelib_unixtime2gmt(tm, ts + gmt_offset->offset); in timelib_unixtime2local()
198 tm->sse = ts; in timelib_unixtime2local()
199 tm->dst = gmt_offset->is_dst; in timelib_unixtime2local()
200 tm->z = gmt_offset->offset; in timelib_unixtime2local()
201 tm->tz_info = tz; in timelib_unixtime2local()
203 timelib_time_tz_abbr_update(tm, gmt_offset->abbr); in timelib_unixtime2local()
208 tm->is_localtime = 0; in timelib_unixtime2local()
209 tm->have_zone = 0; in timelib_unixtime2local()
213 tm->is_localtime = 1; in timelib_unixtime2local()
214 tm->have_zone = 1; in timelib_unixtime2local()