Lines Matching refs:t
217 void timelib_set_timezone_from_offset(timelib_time *t, timelib_sll utc_offset) in timelib_set_timezone_from_offset() argument
219 if (t->tz_abbr) { in timelib_set_timezone_from_offset()
220 free(t->tz_abbr); in timelib_set_timezone_from_offset()
222 t->tz_abbr = NULL; in timelib_set_timezone_from_offset()
224 t->z = utc_offset; in timelib_set_timezone_from_offset()
225 t->have_zone = 1; in timelib_set_timezone_from_offset()
226 t->zone_type = TIMELIB_ZONETYPE_OFFSET; in timelib_set_timezone_from_offset()
227 t->dst = 0; in timelib_set_timezone_from_offset()
228 t->tz_info = NULL; in timelib_set_timezone_from_offset()
231 void timelib_set_timezone_from_abbr(timelib_time *t, timelib_abbr_info abbr_info) in timelib_set_timezone_from_abbr() argument
233 if (t->tz_abbr) { in timelib_set_timezone_from_abbr()
234 free(t->tz_abbr); in timelib_set_timezone_from_abbr()
236 t->tz_abbr = strdup(abbr_info.abbr); in timelib_set_timezone_from_abbr()
238 t->z = abbr_info.utc_offset; in timelib_set_timezone_from_abbr()
239 t->have_zone = 1; in timelib_set_timezone_from_abbr()
240 t->zone_type = TIMELIB_ZONETYPE_ABBR; in timelib_set_timezone_from_abbr()
241 t->dst = abbr_info.dst; in timelib_set_timezone_from_abbr()
242 t->tz_info = NULL; in timelib_set_timezone_from_abbr()
245 void timelib_set_timezone(timelib_time *t, timelib_tzinfo *tz) in timelib_set_timezone() argument
249 gmt_offset = timelib_get_time_zone_info(t->sse, tz); in timelib_set_timezone()
250 t->z = gmt_offset->offset; in timelib_set_timezone()
257 t->dst = gmt_offset->is_dst; in timelib_set_timezone()
258 t->tz_info = tz; in timelib_set_timezone()
259 if (t->tz_abbr) { in timelib_set_timezone()
260 free(t->tz_abbr); in timelib_set_timezone()
262 t->tz_abbr = strdup(gmt_offset->abbr); in timelib_set_timezone()
265 t->have_zone = 1; in timelib_set_timezone()
266 t->zone_type = TIMELIB_ZONETYPE_ID; in timelib_set_timezone()
272 int timelib_apply_localtime(timelib_time *t, unsigned int localtime) in timelib_apply_localtime() argument
279 if (!t->tz_info) { in timelib_apply_localtime()
284 timelib_unixtime2local(t, t->sse); in timelib_apply_localtime()
289 timelib_unixtime2gmt(t, t->sse); in timelib_apply_localtime()