Lines Matching refs:tm

33 void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)  in timelib_unixtime2gmt()  argument
105 tm->y = cur_year; in timelib_unixtime2gmt()
106 tm->m = i + 1; in timelib_unixtime2gmt()
107 tm->d = tmp_days - months[i]; in timelib_unixtime2gmt()
108 tm->h = hours; in timelib_unixtime2gmt()
109 tm->i = minutes; in timelib_unixtime2gmt()
110 tm->s = seconds; in timelib_unixtime2gmt()
111 tm->z = 0; in timelib_unixtime2gmt()
112 tm->dst = 0; in timelib_unixtime2gmt()
113 tm->sse = ts; in timelib_unixtime2gmt()
114 tm->sse_uptodate = 1; in timelib_unixtime2gmt()
115 tm->tim_uptodate = 1; in timelib_unixtime2gmt()
116 tm->is_localtime = 0; in timelib_unixtime2gmt()
119 void timelib_update_from_sse(timelib_time *tm) in timelib_update_from_sse() argument
122 int z = tm->z; in timelib_update_from_sse()
123 signed int dst = tm->dst; in timelib_update_from_sse()
125 sse = tm->sse; in timelib_update_from_sse()
127 switch (tm->zone_type) { in timelib_update_from_sse()
130 timelib_unixtime2gmt(tm, tm->sse + tm->z + (tm->dst * 3600)); in timelib_update_from_sse()
138 gmt_offset = timelib_get_time_zone_info(tm->sse, tm->tz_info); in timelib_update_from_sse()
139 timelib_unixtime2gmt(tm, tm->sse + gmt_offset->offset); in timelib_update_from_sse()
146 timelib_unixtime2gmt(tm, tm->sse); in timelib_update_from_sse()
150 tm->sse = sse; in timelib_update_from_sse()
151 tm->is_localtime = 1; in timelib_update_from_sse()
152 tm->have_zone = 1; in timelib_update_from_sse()
153 tm->z = z; in timelib_update_from_sse()
154 tm->dst = dst; in timelib_update_from_sse()
157 void timelib_unixtime2local(timelib_time *tm, timelib_sll ts) in timelib_unixtime2local() argument
160 timelib_tzinfo *tz = tm->tz_info; in timelib_unixtime2local()
162 switch (tm->zone_type) { in timelib_unixtime2local()
165 int z = tm->z; in timelib_unixtime2local()
166 signed int dst = tm->dst; in timelib_unixtime2local()
168 timelib_unixtime2gmt(tm, ts + tm->z + (tm->dst * 3600)); in timelib_unixtime2local()
170 tm->sse = ts; in timelib_unixtime2local()
171 tm->z = z; in timelib_unixtime2local()
172 tm->dst = dst; in timelib_unixtime2local()
178 timelib_unixtime2gmt(tm, ts + gmt_offset->offset); in timelib_unixtime2local()
181 tm->sse = ts; in timelib_unixtime2local()
182 tm->dst = gmt_offset->is_dst; in timelib_unixtime2local()
183 tm->z = gmt_offset->offset; in timelib_unixtime2local()
184 tm->tz_info = tz; in timelib_unixtime2local()
186 timelib_time_tz_abbr_update(tm, gmt_offset->abbr); in timelib_unixtime2local()
191 tm->is_localtime = 0; in timelib_unixtime2local()
192 tm->have_zone = 0; in timelib_unixtime2local()
196 tm->is_localtime = 1; in timelib_unixtime2local()
197 tm->have_zone = 1; in timelib_unixtime2local()