Lines Matching full:localtime
104 #define LOCALTIME_FILE "/etc/localtime"
145 * but should be /usr/share/zoneinfo by default. /etc/localtime is not guaranteed to exist on
146 * all platforms, so if it doesn't, try $TZDIR/localtime, then /usr/share/zoneinfo/locatime
149 * besides, modern Linux distribution don't make /etc/localtime a symlink but a straight copy of
164 #define LOCALTIME_FILE1 "/etc/localtime"
167 const char* localtime;
193 fd1 = open( scan->localtime, O_RDONLY );
195 D(" can't open %s: %s\n", scan->localtime, strerror(errno) );
309 char* localtime = NULL;
344 /* try to find the localtime file */
345 localtime = LOCALTIME_FILE1;
346 if ( access( localtime, R_OK ) != 0 ) {
349 p = bufprint( p, end, "%s/%s", tzdir, "localtime" );
355 localtime = temp;
357 localtime = strdup(localtime);
358 D( "%s: found localtime file as %s\n", __FUNCTION__, localtime );
361 /* if the localtime file is a link, make a quick check */
362 len = readlink( localtime, temp, sizeof(temp)-1 );
371 D( "%s: found zoneinfo timezone %s from %s symlink\n", __FUNCTION__, tz, localtime );
375 __FUNCTION__, localtime, temp );
384 if ( stat( localtime, &scan->localtime_st ) < 0 ) {
386 localtime );
390 scan->localtime = localtime;
400 if (localtime)
401 free(localtime);
689 struct tm* tm = localtime(&t);