Lines Matching refs:tz
191 const char *tz = *tzp; in parse_offset() local
193 && (*tz == '\0' || (*tz != '+' && *tz != '-' && !isdigit (*tz)))) in parse_offset()
197 if (*tz == '-' || *tz == '+') in parse_offset()
198 sign = *tz++ == '-' ? 1 : -1; in parse_offset()
201 *tzp = tz; in parse_offset()
207 if (sscanf (tz, "%hu%n:%hu%n:%hu%n", in parse_offset()
221 *tzp = tz + consumed; in parse_offset()
231 const char *tz = *tzp; in parse_rule() local
236 tz += *tz == ','; in parse_rule()
239 if (*tz == 'J' || isdigit (*tz)) in parse_rule()
242 tzr->type = *tz == 'J' ? J1 : J0; in parse_rule()
243 if (tzr->type == J1 && !isdigit (*++tz)) in parse_rule()
245 unsigned long int d = strtoul (tz, &end, 10); in parse_rule()
246 if (end == tz || d > 365) in parse_rule()
251 tz = end; in parse_rule()
253 else if (*tz == 'M') in parse_rule()
257 if (sscanf (tz, "M%hu.%hu.%hu%n", in parse_rule()
262 tz += consumed; in parse_rule()
264 else if (*tz == '\0') in parse_rule()
289 if (*tz != '\0' && *tz != '/' && *tz != ',') in parse_rule()
291 else if (*tz == '/') in parse_rule()
295 ++tz; in parse_rule()
296 if (*tz == '\0') in parse_rule()
298 negative = *tz == '-'; in parse_rule()
299 tz += negative; in parse_rule()
305 sscanf (tz, "%hu%n:%hu%n:%hu%n", in parse_rule()
307 tz += consumed; in parse_rule()
315 *tzp = tz; in parse_rule()
321 __tzset_parse_tz (const char *tz) in __tzset_parse_tz() argument
328 if (parse_tzname (&tz, 0) && parse_offset (&tz, 0)) in __tzset_parse_tz()
331 if (*tz != '\0') in __tzset_parse_tz()
333 if (parse_tzname (&tz, 1)) in __tzset_parse_tz()
335 parse_offset (&tz, 1); in __tzset_parse_tz()
336 if (*tz == '\0' || (tz[0] == ',' && tz[1] == '\0')) in __tzset_parse_tz()
351 if (parse_rule (&tz, 0)) in __tzset_parse_tz()
352 parse_rule (&tz, 1); in __tzset_parse_tz()
370 const char *tz; in tzset_internal() local
377 tz = getenv ("TZ"); in tzset_internal()
378 if (tz && *tz == '\0') in tzset_internal()
380 tz = "Universal"; in tzset_internal()
385 if (tz && *tz == ':') in tzset_internal()
386 ++tz; in tzset_internal()
389 if (old_tz != NULL && tz != NULL && strcmp (tz, old_tz) == 0) in tzset_internal()
393 if (tz == NULL) in tzset_internal()
395 tz = TZDEFAULT; in tzset_internal()
402 old_tz = tz ? __strdup (tz) : NULL; in tzset_internal()
405 __tzfile_read (tz, 0, NULL); in tzset_internal()
411 if (tz == NULL || *tz == '\0' in tzset_internal()
412 || (TZDEFAULT != NULL && strcmp (tz, TZDEFAULT) == 0)) in tzset_internal()
423 __tzset_parse_tz (tz); in tzset_internal()