Lines Matching refs:tz

94 static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)  in read_php_preamble()  argument
103 tz->bc = (**tzf == '\1'); in read_php_preamble()
107 memcpy(tz->location.country_code, *tzf, 2); in read_php_preamble()
108 tz->location.country_code[2] = '\0'; in read_php_preamble()
117 static int read_tzif_preamble(const unsigned char **tzf, timelib_tzinfo *tz) in read_tzif_preamble() argument
141 tz->bc = 0; in read_tzif_preamble()
142 tz->location.country_code[0] = '?'; in read_tzif_preamble()
143 tz->location.country_code[1] = '?'; in read_tzif_preamble()
144 tz->location.country_code[2] = '\0'; in read_tzif_preamble()
152 static int read_preamble(const unsigned char **tzf, timelib_tzinfo *tz, unsigned int *type) in read_preamble() argument
157 return read_php_preamble(tzf, tz); in read_preamble()
160 return read_tzif_preamble(tzf, tz); in read_preamble()
166 static void read_32bit_header(const unsigned char **tzf, timelib_tzinfo *tz) in read_32bit_header() argument
171 tz->_bit32.ttisgmtcnt = timelib_conv_int_unsigned(buffer[0]); in read_32bit_header()
172 tz->_bit32.ttisstdcnt = timelib_conv_int_unsigned(buffer[1]); in read_32bit_header()
173 tz->_bit32.leapcnt = timelib_conv_int_unsigned(buffer[2]); in read_32bit_header()
174 tz->_bit32.timecnt = timelib_conv_int_unsigned(buffer[3]); in read_32bit_header()
175 tz->_bit32.typecnt = timelib_conv_int_unsigned(buffer[4]); in read_32bit_header()
176 tz->_bit32.charcnt = timelib_conv_int_unsigned(buffer[5]); in read_32bit_header()
181 static int detect_slim_file(timelib_tzinfo *tz) in detect_slim_file() argument
184 (tz->_bit32.ttisgmtcnt == 0) && in detect_slim_file()
185 (tz->_bit32.ttisstdcnt == 0) && in detect_slim_file()
186 (tz->_bit32.leapcnt == 0) && in detect_slim_file()
187 (tz->_bit32.timecnt == 0) && in detect_slim_file()
188 (tz->_bit32.typecnt == 1) && in detect_slim_file()
189 (tz->_bit32.charcnt == 1) in detect_slim_file()
197 static int read_64bit_transitions(const unsigned char **tzf, timelib_tzinfo *tz) in read_64bit_transitions() argument
203 if (tz->bit64.timecnt) { in read_64bit_transitions()
204 buffer = (int64_t*) timelib_malloc(tz->bit64.timecnt * sizeof(int64_t)); in read_64bit_transitions()
208 memcpy(buffer, *tzf, sizeof(int64_t) * tz->bit64.timecnt); in read_64bit_transitions()
209 *tzf += (sizeof(int64_t) * tz->bit64.timecnt); in read_64bit_transitions()
210 for (i = 0; i < tz->bit64.timecnt; i++) { in read_64bit_transitions()
218 cbuffer = (unsigned char*) timelib_malloc(tz->bit64.timecnt * sizeof(unsigned char)); in read_64bit_transitions()
223 memcpy(cbuffer, *tzf, sizeof(unsigned char) * tz->bit64.timecnt); in read_64bit_transitions()
224 *tzf += sizeof(unsigned char) * tz->bit64.timecnt; in read_64bit_transitions()
227 tz->trans = buffer; in read_64bit_transitions()
228 tz->trans_idx = cbuffer; in read_64bit_transitions()
233 static void skip_32bit_transitions(const unsigned char **tzf, timelib_tzinfo *tz) in skip_32bit_transitions() argument
235 if (tz->_bit32.timecnt) { in skip_32bit_transitions()
236 *tzf += (sizeof(int32_t) * tz->_bit32.timecnt); in skip_32bit_transitions()
237 *tzf += sizeof(unsigned char) * tz->_bit32.timecnt; in skip_32bit_transitions()
241 static int read_64bit_types(const unsigned char **tzf, timelib_tzinfo *tz) in read_64bit_types() argument
248 buffer = (unsigned char*) timelib_malloc(tz->bit64.typecnt * sizeof(unsigned char) * 6); in read_64bit_types()
252 memcpy(buffer, *tzf, sizeof(unsigned char) * 6 * tz->bit64.typecnt); in read_64bit_types()
253 *tzf += sizeof(unsigned char) * 6 * tz->bit64.typecnt; in read_64bit_types()
257 tz->type = (ttinfo*) timelib_calloc(1, (tz->bit64.typecnt + 2) * sizeof(ttinfo)); in read_64bit_types()
258 if (!tz->type) { in read_64bit_types()
263 for (i = 0; i < tz->bit64.typecnt; i++) { in read_64bit_types()
265 tz->type[i].offset = 0; in read_64bit_types()
266tz->type[i].offset += (int32_t) (((uint32_t) buffer[j]) << 24) + (buffer[j + 1] << 16) + (buffer[j… in read_64bit_types()
267 tz->type[i].isdst = buffer[j + 4]; in read_64bit_types()
268 tz->type[i].abbr_idx = buffer[j + 5]; in read_64bit_types()
273 tz->timezone_abbr = (char*) timelib_malloc(tz->bit64.charcnt); in read_64bit_types()
274 if (!tz->timezone_abbr) { in read_64bit_types()
277 memcpy(tz->timezone_abbr, *tzf, sizeof(char) * tz->bit64.charcnt); in read_64bit_types()
278 *tzf += sizeof(char) * tz->bit64.charcnt; in read_64bit_types()
281 if (tz->bit64.leapcnt) { in read_64bit_types()
282 leap_buffer = (int32_t *) timelib_malloc(tz->bit64.leapcnt * (sizeof(int64_t) + sizeof(int32_t))); in read_64bit_types()
286 memcpy(leap_buffer, *tzf, tz->bit64.leapcnt * (sizeof(int64_t) + sizeof(int32_t))); in read_64bit_types()
287 *tzf += tz->bit64.leapcnt * (sizeof(int64_t) + sizeof(int32_t)); in read_64bit_types()
289 tz->leap_times = (tlinfo*) timelib_malloc(tz->bit64.leapcnt * sizeof(tlinfo)); in read_64bit_types()
290 if (!tz->leap_times) { in read_64bit_types()
294 for (i = 0; i < tz->bit64.leapcnt; i++) { in read_64bit_types()
295tz->leap_times[i].trans = timelib_conv_int64_signed(leap_buffer[i * 3 + 1] * 4294967296 + leap_buf… in read_64bit_types()
296 tz->leap_times[i].offset = timelib_conv_int_signed(leap_buffer[i * 3 + 2]); in read_64bit_types()
302 if (tz->bit64.ttisstdcnt) { in read_64bit_types()
303 buffer = (unsigned char*) timelib_malloc(tz->bit64.ttisstdcnt * sizeof(unsigned char)); in read_64bit_types()
307 memcpy(buffer, *tzf, sizeof(unsigned char) * tz->bit64.ttisstdcnt); in read_64bit_types()
308 *tzf += sizeof(unsigned char) * tz->bit64.ttisstdcnt; in read_64bit_types()
310 for (i = 0; i < tz->bit64.ttisstdcnt; i++) { in read_64bit_types()
311 tz->type[i].isstdcnt = buffer[i]; in read_64bit_types()
317 if (tz->bit64.ttisgmtcnt) { in read_64bit_types()
318 buffer = (unsigned char*) timelib_malloc(tz->bit64.ttisgmtcnt * sizeof(unsigned char)); in read_64bit_types()
322 memcpy(buffer, *tzf, sizeof(unsigned char) * tz->bit64.ttisgmtcnt); in read_64bit_types()
323 *tzf += sizeof(unsigned char) * tz->bit64.ttisgmtcnt; in read_64bit_types()
325 for (i = 0; i < tz->bit64.ttisgmtcnt; i++) { in read_64bit_types()
326 tz->type[i].isgmtcnt = buffer[i]; in read_64bit_types()
334 static void skip_32bit_types(const unsigned char **tzf, timelib_tzinfo *tz) in skip_32bit_types() argument
337 *tzf += sizeof(unsigned char) * 6 * tz->_bit32.typecnt; in skip_32bit_types()
340 *tzf += sizeof(char) * tz->_bit32.charcnt; in skip_32bit_types()
343 if (tz->_bit32.leapcnt) { in skip_32bit_types()
344 *tzf += sizeof(int32_t) * tz->_bit32.leapcnt * 2; in skip_32bit_types()
348 if (tz->_bit32.ttisstdcnt) { in skip_32bit_types()
349 *tzf += sizeof(unsigned char) * tz->_bit32.ttisstdcnt; in skip_32bit_types()
353 if (tz->_bit32.ttisgmtcnt) { in skip_32bit_types()
354 *tzf += sizeof(unsigned char) * tz->_bit32.ttisgmtcnt; in skip_32bit_types()
358 static void read_posix_string(const unsigned char **tzf, timelib_tzinfo *tz) in read_posix_string() argument
370 tz->posix_string = timelib_calloc(1, *tzf - begin + 1); in read_posix_string()
371 memcpy(tz->posix_string, begin, *tzf - begin); in read_posix_string()
377 static signed int find_ttinfo_index(timelib_tzinfo *tz, int32_t offset, int isdst, char *abbr) in find_ttinfo_index() argument
381 for (i = 0; i < tz->bit64.typecnt; i++) { in find_ttinfo_index()
383 (offset == tz->type[i].offset) && in find_ttinfo_index()
384 (isdst == tz->type[i].isdst) && in find_ttinfo_index()
385 (strcmp(abbr, &tz->timezone_abbr[tz->type[i].abbr_idx]) == 0) in find_ttinfo_index()
394 static unsigned int add_abbr(timelib_tzinfo *tz, char *abbr) in add_abbr() argument
396 size_t old_length = tz->bit64.charcnt; in add_abbr()
398 tz->timezone_abbr = (char*) timelib_realloc(tz->timezone_abbr, new_length); in add_abbr()
399 memcpy(tz->timezone_abbr + old_length, abbr, strlen(abbr)); in add_abbr()
400 tz->bit64.charcnt = new_length; in add_abbr()
401 tz->timezone_abbr[new_length - 1] = '\0'; in add_abbr()
406 static signed int add_new_ttinfo_index(timelib_tzinfo *tz, int32_t offset, int isdst, char *abbr) in add_new_ttinfo_index() argument
408 tz->type[tz->bit64.typecnt].offset = offset; in add_new_ttinfo_index()
409 tz->type[tz->bit64.typecnt].isdst = isdst; in add_new_ttinfo_index()
410 tz->type[tz->bit64.typecnt].abbr_idx = add_abbr(tz, abbr); in add_new_ttinfo_index()
411 tz->type[tz->bit64.typecnt].isstdcnt = 0; in add_new_ttinfo_index()
412 tz->type[tz->bit64.typecnt].isgmtcnt = 0; in add_new_ttinfo_index()
414 ++tz->bit64.typecnt; in add_new_ttinfo_index()
416 return tz->bit64.typecnt - 1; in add_new_ttinfo_index()
419 static int integrate_posix_string(timelib_tzinfo *tz) in integrate_posix_string() argument
421 tz->posix_info = timelib_parse_posix_str(tz->posix_string); in integrate_posix_string()
422 if (!tz->posix_info) { in integrate_posix_string()
426tz->posix_info->type_index_std_type = find_ttinfo_index(tz, tz->posix_info->std_offset, 0, tz->pos… in integrate_posix_string()
427 if (tz->posix_info->type_index_std_type == TIMELIB_UNSET) { in integrate_posix_string()
428tz->posix_info->type_index_std_type = add_new_ttinfo_index(tz, tz->posix_info->std_offset, 0, tz->… in integrate_posix_string()
433 if (!tz->posix_info->dst) { in integrate_posix_string()
437tz->posix_info->type_index_dst_type = find_ttinfo_index(tz, tz->posix_info->dst_offset, 1, tz->pos… in integrate_posix_string()
438 if (tz->posix_info->type_index_dst_type == TIMELIB_UNSET) { in integrate_posix_string()
439tz->posix_info->type_index_dst_type = add_new_ttinfo_index(tz, tz->posix_info->dst_offset, 1, tz->… in integrate_posix_string()
446 static void read_location(const unsigned char **tzf, timelib_tzinfo *tz) in read_location() argument
452 tz->location.latitude = timelib_conv_int_unsigned(buffer[0]); in read_location()
453 tz->location.latitude = (tz->location.latitude / 100000) - 90; in read_location()
454 tz->location.longitude = timelib_conv_int_unsigned(buffer[1]); in read_location()
455 tz->location.longitude = (tz->location.longitude / 100000) - 180; in read_location()
459 tz->location.comments = timelib_malloc(comments_len + 1); in read_location()
460 memcpy(tz->location.comments, *tzf, comments_len); in read_location()
461 tz->location.comments[comments_len] = '\0'; in read_location()
465 static void set_default_location_and_comments(const unsigned char **tzf, timelib_tzinfo *tz) in set_default_location_and_comments() argument
467 tz->location.latitude = 0; in set_default_location_and_comments()
468 tz->location.longitude = 0; in set_default_location_and_comments()
469 tz->location.comments = timelib_malloc(2); in set_default_location_and_comments()
470 tz->location.comments[0] = '?'; in set_default_location_and_comments()
471 tz->location.comments[1] = '\0'; in set_default_location_and_comments()
474 static char *format_ut_time(timelib_sll ts, timelib_tzinfo *tz) in format_ut_time() argument
491 static char *format_offset_type(timelib_tzinfo *tz, int i) in format_offset_type() argument
499 (long int) tz->type[i].offset, in format_offset_type()
500 tz->type[i].isdst, in format_offset_type()
501 tz->type[i].abbr_idx, in format_offset_type()
502 &tz->timezone_abbr[tz->type[i].abbr_idx], in format_offset_type()
503 tz->type[i].isstdcnt, in format_offset_type()
504 tz->type[i].isgmtcnt in format_offset_type()
510 void timelib_dump_tzinfo(timelib_tzinfo *tz) in timelib_dump_tzinfo() argument
515 printf("Country Code: %s\n", tz->location.country_code); in timelib_dump_tzinfo()
516 printf("Geo Location: %f,%f\n", tz->location.latitude, tz->location.longitude); in timelib_dump_tzinfo()
517 printf("Comments:\n%s\n", tz->location.comments); in timelib_dump_tzinfo()
518 printf("BC: %s\n", tz->bc ? "no" : "yes"); in timelib_dump_tzinfo()
519 printf("Slim File: %s\n", detect_slim_file(tz) ? "yes" : "no"); in timelib_dump_tzinfo()
522 printf("UTC/Local count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit64.ttisgmtcnt); in timelib_dump_tzinfo()
523 printf("Std/Wall count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit64.ttisstdcnt); in timelib_dump_tzinfo()
524 printf("Leap.sec. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit64.leapcnt); in timelib_dump_tzinfo()
525 printf("Trans. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit64.timecnt); in timelib_dump_tzinfo()
526 printf("Local types count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit64.typecnt); in timelib_dump_tzinfo()
527 printf("Zone Abbr. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit64.charcnt); in timelib_dump_tzinfo()
529 trans_str = format_offset_type(tz, 0); in timelib_dump_tzinfo()
533 for (i = 0; i < tz->bit64.timecnt; i++) { in timelib_dump_tzinfo()
534 date_str = format_ut_time(tz->trans[i], tz); in timelib_dump_tzinfo()
535 trans_str = format_offset_type(tz, tz->trans_idx[i]); in timelib_dump_tzinfo()
539 tz->trans[i], in timelib_dump_tzinfo()
545 for (i = 0; i < tz->bit64.leapcnt; i++) { in timelib_dump_tzinfo()
546 date_str = format_ut_time(tz->trans[i], tz); in timelib_dump_tzinfo()
550 (long) tz->leap_times[i].trans, in timelib_dump_tzinfo()
551 tz->leap_times[i].offset in timelib_dump_tzinfo()
556 if (!tz->posix_string) { in timelib_dump_tzinfo()
561 if (strcmp("", tz->posix_string) == 0) { in timelib_dump_tzinfo()
566 printf("\n%43sPOSIX string: %s\n", "", tz->posix_string); in timelib_dump_tzinfo()
567 if (tz->posix_info && tz->posix_info->std) { in timelib_dump_tzinfo()
568 trans_str = format_offset_type(tz, tz->posix_info->type_index_std_type); in timelib_dump_tzinfo()
572 if (tz->posix_info->dst) { in timelib_dump_tzinfo()
573 trans_str = format_offset_type(tz, tz->posix_info->type_index_dst_type); in timelib_dump_tzinfo()
623 static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) in skip_64bit_preamble() argument
639 static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz) in read_64bit_header() argument
644 tz->bit64.ttisgmtcnt = timelib_conv_int_unsigned(buffer[0]); in read_64bit_header()
645 tz->bit64.ttisstdcnt = timelib_conv_int_unsigned(buffer[1]); in read_64bit_header()
646 tz->bit64.leapcnt = timelib_conv_int_unsigned(buffer[2]); in read_64bit_header()
647 tz->bit64.timecnt = timelib_conv_int_unsigned(buffer[3]); in read_64bit_header()
648 tz->bit64.typecnt = timelib_conv_int_unsigned(buffer[4]); in read_64bit_header()
649 tz->bit64.charcnt = timelib_conv_int_unsigned(buffer[5]); in read_64bit_header()
728 void timelib_tzinfo_dtor(timelib_tzinfo *tz) in timelib_tzinfo_dtor() argument
730 TIMELIB_TIME_FREE(tz->name); in timelib_tzinfo_dtor()
731 TIMELIB_TIME_FREE(tz->trans); in timelib_tzinfo_dtor()
732 TIMELIB_TIME_FREE(tz->trans_idx); in timelib_tzinfo_dtor()
733 TIMELIB_TIME_FREE(tz->type); in timelib_tzinfo_dtor()
734 TIMELIB_TIME_FREE(tz->timezone_abbr); in timelib_tzinfo_dtor()
735 TIMELIB_TIME_FREE(tz->leap_times); in timelib_tzinfo_dtor()
736 TIMELIB_TIME_FREE(tz->location.comments); in timelib_tzinfo_dtor()
737 TIMELIB_TIME_FREE(tz->posix_string); in timelib_tzinfo_dtor()
738 if (tz->posix_info) { in timelib_tzinfo_dtor()
739 timelib_posix_str_dtor(tz->posix_info); in timelib_tzinfo_dtor()
741 TIMELIB_TIME_FREE(tz); in timelib_tzinfo_dtor()
742 tz = NULL; in timelib_tzinfo_dtor()
745 timelib_tzinfo *timelib_tzinfo_clone(timelib_tzinfo *tz) in timelib_tzinfo_clone() argument
747 timelib_tzinfo *tmp = timelib_tzinfo_ctor(tz->name); in timelib_tzinfo_clone()
748 tmp->_bit32.ttisgmtcnt = tz->_bit32.ttisgmtcnt; in timelib_tzinfo_clone()
749 tmp->_bit32.ttisstdcnt = tz->_bit32.ttisstdcnt; in timelib_tzinfo_clone()
750 tmp->_bit32.leapcnt = tz->_bit32.leapcnt; in timelib_tzinfo_clone()
751 tmp->_bit32.timecnt = tz->_bit32.timecnt; in timelib_tzinfo_clone()
752 tmp->_bit32.typecnt = tz->_bit32.typecnt; in timelib_tzinfo_clone()
753 tmp->_bit32.charcnt = tz->_bit32.charcnt; in timelib_tzinfo_clone()
754 tmp->bit64.ttisgmtcnt = tz->bit64.ttisgmtcnt; in timelib_tzinfo_clone()
755 tmp->bit64.ttisstdcnt = tz->bit64.ttisstdcnt; in timelib_tzinfo_clone()
756 tmp->bit64.leapcnt = tz->bit64.leapcnt; in timelib_tzinfo_clone()
757 tmp->bit64.timecnt = tz->bit64.timecnt; in timelib_tzinfo_clone()
758 tmp->bit64.typecnt = tz->bit64.typecnt; in timelib_tzinfo_clone()
759 tmp->bit64.charcnt = tz->bit64.charcnt; in timelib_tzinfo_clone()
761 if (tz->bit64.timecnt) { in timelib_tzinfo_clone()
762 tmp->trans = (int64_t *) timelib_malloc(tz->bit64.timecnt * sizeof(int64_t)); in timelib_tzinfo_clone()
763 tmp->trans_idx = (unsigned char*) timelib_malloc(tz->bit64.timecnt * sizeof(unsigned char)); in timelib_tzinfo_clone()
764 memcpy(tmp->trans, tz->trans, tz->bit64.timecnt * sizeof(int64_t)); in timelib_tzinfo_clone()
765 memcpy(tmp->trans_idx, tz->trans_idx, tz->bit64.timecnt * sizeof(unsigned char)); in timelib_tzinfo_clone()
768 tmp->type = (ttinfo*) timelib_malloc(tz->bit64.typecnt * sizeof(ttinfo)); in timelib_tzinfo_clone()
769 memcpy(tmp->type, tz->type, tz->bit64.typecnt * sizeof(ttinfo)); in timelib_tzinfo_clone()
771 tmp->timezone_abbr = (char*) timelib_malloc(tz->bit64.charcnt); in timelib_tzinfo_clone()
772 memcpy(tmp->timezone_abbr, tz->timezone_abbr, tz->bit64.charcnt); in timelib_tzinfo_clone()
774 if (tz->bit64.leapcnt) { in timelib_tzinfo_clone()
775 tmp->leap_times = (tlinfo*) timelib_malloc(tz->bit64.leapcnt * sizeof(tlinfo)); in timelib_tzinfo_clone()
776 memcpy(tmp->leap_times, tz->leap_times, tz->bit64.leapcnt * sizeof(tlinfo)); in timelib_tzinfo_clone()
779 if (tz->posix_string) { in timelib_tzinfo_clone()
780 tmp->posix_string = timelib_strdup(tz->posix_string); in timelib_tzinfo_clone()
790 ttinfo* timelib_fetch_timezone_offset(timelib_tzinfo *tz, timelib_sll ts, timelib_sll *transition_t… in timelib_fetch_timezone_offset() argument
800 if (!tz->bit64.timecnt || !tz->trans) { in timelib_fetch_timezone_offset()
801 if (tz->posix_info) { in timelib_fetch_timezone_offset()
803 return timelib_fetch_posix_timezone_offset(tz, ts, NULL); in timelib_fetch_timezone_offset()
806 if (tz->bit64.typecnt == 1) { in timelib_fetch_timezone_offset()
808 return &(tz->type[0]); in timelib_fetch_timezone_offset()
815 if (ts < tz->trans[0]) { in timelib_fetch_timezone_offset()
817 return &(tz->type[0]); in timelib_fetch_timezone_offset()
826 if (ts >= tz->trans[tz->bit64.timecnt - 1]) { in timelib_fetch_timezone_offset()
827 if (tz->posix_info) { in timelib_fetch_timezone_offset()
828 return timelib_fetch_posix_timezone_offset(tz, ts, transition_time); in timelib_fetch_timezone_offset()
831 *transition_time = tz->trans[tz->bit64.timecnt - 1]; in timelib_fetch_timezone_offset()
832 return &(tz->type[tz->trans_idx[tz->bit64.timecnt - 1]]); in timelib_fetch_timezone_offset()
839 right = tz->bit64.timecnt - 1; in timelib_fetch_timezone_offset()
844 if (ts < tz->trans[mid]) { in timelib_fetch_timezone_offset()
850 *transition_time = tz->trans[left]; in timelib_fetch_timezone_offset()
851 return &(tz->type[tz->trans_idx[left]]); in timelib_fetch_timezone_offset()
854 static tlinfo* fetch_leaptime_offset(timelib_tzinfo *tz, timelib_sll ts) in fetch_leaptime_offset() argument
858 if (!tz->bit64.leapcnt || !tz->leap_times) { in fetch_leaptime_offset()
862 for (i = tz->bit64.leapcnt - 1; i > 0; i--) { in fetch_leaptime_offset()
863 if (ts > tz->leap_times[i].trans) { in fetch_leaptime_offset()
864 return &(tz->leap_times[i]); in fetch_leaptime_offset()
870 int timelib_timestamp_is_in_dst(timelib_sll ts, timelib_tzinfo *tz) in timelib_timestamp_is_in_dst() argument
875 if ((to = timelib_fetch_timezone_offset(tz, ts, &dummy))) { in timelib_timestamp_is_in_dst()
881 timelib_time_offset *timelib_get_time_zone_info(timelib_sll ts, timelib_tzinfo *tz) in timelib_get_time_zone_info() argument
890 if ((to = timelib_fetch_timezone_offset(tz, ts, &transition_time))) { in timelib_get_time_zone_info()
892 abbr = &(tz->timezone_abbr[to->abbr_idx]); in timelib_get_time_zone_info()
897 abbr = tz->timezone_abbr; in timelib_get_time_zone_info()
902 if ((tl = fetch_leaptime_offset(tz, ts))) { in timelib_get_time_zone_info()
913 int timelib_get_time_zone_offset_info(timelib_sll ts, timelib_tzinfo *tz, int32_t* offset, timelib_… in timelib_get_time_zone_offset_info() argument
918 if (tz == NULL) { in timelib_get_time_zone_offset_info()
922 if ((to = timelib_fetch_timezone_offset(tz, ts, &tmp_transition_time))) { in timelib_get_time_zone_offset_info()