Lines Matching full:tzdir
143 /* on Linux, with glibc2, the zoneinfo directory can be changed with TZDIR environment variable
145 * all platforms, so if it doesn't, try $TZDIR/localtime, then /usr/share/zoneinfo/locatime
150 * it with all files in $TZDIR (at least those that match Area/Location or Area/Location/SubLocation
306 char* tzdir = NULL;
314 const char* env = getenv("TZDIR");
325 D( "%s: TZDIR does not point to valid directory, using %s instead\n",
331 tzdir = strdup(env);
335 len = strlen(tzdir);
336 if (len > 0 && tzdir[len-1] == '/') {
337 tzdir[len-1] = 0;
341 D( "%s: found timezone dir as %s\n", __FUNCTION__, tzdir );
348 p = bufprint( p, end, "%s/%s", tzdir, "localtime" );
365 /* verify that the link points to tzdir/<something> where <something> is a valid zoneinfo name */
366 if ( !memcmp( temp, tzdir, tzdirlen ) && temp[tzdirlen] == '/' ) {
379 /* otherwise, parse all files under tzdir and see if we have something that looks like it */
391 scan->path_root = bufprint( scan->path, scan->path_end, "%s", tzdir );
397 if (tzdir)
398 free(tzdir);