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
141 sse = tm->sse; in timelib_update_from_sse()
143 switch (tm->zone_type) { in timelib_update_from_sse()
146 int z = tm->z; in timelib_update_from_sse()
147 signed int dst = tm->dst; in timelib_update_from_sse()
149 timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60) + (tm->dst * 3600)); in timelib_update_from_sse()
151 tm->z = z; in timelib_update_from_sse()
152 tm->dst = dst; in timelib_update_from_sse()
159 gmt_offset = timelib_get_time_zone_info(tm->sse, tm->tz_info); in timelib_update_from_sse()
160 timelib_unixtime2gmt(tm, tm->sse + gmt_offset->offset); in timelib_update_from_sse()
167 timelib_unixtime2gmt(tm, tm->sse); in timelib_update_from_sse()
171 tm->sse = sse; in timelib_update_from_sse()
172 tm->is_localtime = 1; in timelib_update_from_sse()
173 tm->have_zone = 1; in timelib_update_from_sse()
176 void timelib_unixtime2local(timelib_time *tm, timelib_sll ts) in timelib_unixtime2local() argument
179 timelib_tzinfo *tz = tm->tz_info; in timelib_unixtime2local()
181 switch (tm->zone_type) { in timelib_unixtime2local()
184 int z = tm->z; in timelib_unixtime2local()
185 signed int dst = tm->dst; in timelib_unixtime2local()
187 timelib_unixtime2gmt(tm, ts - (tm->z * 60) + (tm->dst * 3600)); in timelib_unixtime2local()
189 tm->z = z; in timelib_unixtime2local()
190 tm->dst = dst; in timelib_unixtime2local()
196 timelib_unixtime2gmt(tm, ts + gmt_offset->offset); in timelib_unixtime2local()
199 tm->sse = ts; in timelib_unixtime2local()
200 tm->dst = gmt_offset->is_dst; in timelib_unixtime2local()
201 tm->z = gmt_offset->offset; in timelib_unixtime2local()
202 tm->tz_info = tz; in timelib_unixtime2local()
204 timelib_time_tz_abbr_update(tm, gmt_offset->abbr); in timelib_unixtime2local()
209 tm->is_localtime = 0; in timelib_unixtime2local()
210 tm->have_zone = 0; in timelib_unixtime2local()
214 tm->is_localtime = 1; in timelib_unixtime2local()
215 tm->have_zone = 1; in timelib_unixtime2local()