modified tzset to use the global tzfilename when no TZ env variable is found
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10180 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -947,15 +947,24 @@ tzsetwall P((void))
|
||||
settzname();
|
||||
}
|
||||
|
||||
|
||||
#include <StorageDefs.h>
|
||||
void _get_tzfilename(char* filename, size_t length);
|
||||
|
||||
void
|
||||
tzset P((void))
|
||||
{
|
||||
register const char * name;
|
||||
char tzfilename[B_PATH_NAME_LENGTH];
|
||||
|
||||
name = getenv("TZ");
|
||||
if (name == NULL) {
|
||||
tzsetwall();
|
||||
return;
|
||||
_get_tzfilename(tzfilename, B_PATH_NAME_LENGTH);
|
||||
if (tzfilename[0] == '\0') {
|
||||
tzsetwall();
|
||||
return;
|
||||
}
|
||||
name = tzfilename;
|
||||
}
|
||||
|
||||
if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)
|
||||
|
||||
Reference in New Issue
Block a user