Lines Matching refs:t
31 timelib_sll days, era, t; in timelib_unixtime2date() local
38 t = ts % SECS_PER_DAY; in timelib_unixtime2date()
39 days += (t < 0) ? -1 : 0; in timelib_unixtime2date()
163 void timelib_set_timezone_from_offset(timelib_time *t, timelib_sll utc_offset) in timelib_set_timezone_from_offset() argument
165 if (t->tz_abbr) { in timelib_set_timezone_from_offset()
166 timelib_free(t->tz_abbr); in timelib_set_timezone_from_offset()
168 t->tz_abbr = NULL; in timelib_set_timezone_from_offset()
170 t->z = utc_offset; in timelib_set_timezone_from_offset()
171 t->have_zone = 1; in timelib_set_timezone_from_offset()
172 t->zone_type = TIMELIB_ZONETYPE_OFFSET; in timelib_set_timezone_from_offset()
173 t->dst = 0; in timelib_set_timezone_from_offset()
174 t->tz_info = NULL; in timelib_set_timezone_from_offset()
177 void timelib_set_timezone_from_abbr(timelib_time *t, timelib_abbr_info abbr_info) in timelib_set_timezone_from_abbr() argument
179 if (t->tz_abbr) { in timelib_set_timezone_from_abbr()
180 timelib_free(t->tz_abbr); in timelib_set_timezone_from_abbr()
182 t->tz_abbr = timelib_strdup(abbr_info.abbr); in timelib_set_timezone_from_abbr()
184 t->z = abbr_info.utc_offset; in timelib_set_timezone_from_abbr()
185 t->have_zone = 1; in timelib_set_timezone_from_abbr()
186 t->zone_type = TIMELIB_ZONETYPE_ABBR; in timelib_set_timezone_from_abbr()
187 t->dst = abbr_info.dst; in timelib_set_timezone_from_abbr()
188 t->tz_info = NULL; in timelib_set_timezone_from_abbr()
191 void timelib_set_timezone(timelib_time *t, timelib_tzinfo *tz) in timelib_set_timezone() argument
195 gmt_offset = timelib_get_time_zone_info(t->sse, tz); in timelib_set_timezone()
196 t->z = gmt_offset->offset; in timelib_set_timezone()
203 t->dst = gmt_offset->is_dst; in timelib_set_timezone()
204 t->tz_info = tz; in timelib_set_timezone()
205 if (t->tz_abbr) { in timelib_set_timezone()
206 timelib_free(t->tz_abbr); in timelib_set_timezone()
208 t->tz_abbr = timelib_strdup(gmt_offset->abbr); in timelib_set_timezone()
211 t->have_zone = 1; in timelib_set_timezone()
212 t->zone_type = TIMELIB_ZONETYPE_ID; in timelib_set_timezone()
218 int timelib_apply_localtime(timelib_time *t, unsigned int localtime) in timelib_apply_localtime() argument
225 if (!t->tz_info) { in timelib_apply_localtime()
230 timelib_unixtime2local(t, t->sse); in timelib_apply_localtime()
235 timelib_unixtime2gmt(t, t->sse); in timelib_apply_localtime()