Redo failed commit

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30543 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-06-02 15:48:43 +00:00
parent 73b70727b9
commit 87286c7f51
2 changed files with 26 additions and 16 deletions

View file

@ -1,3 +1,9 @@
2010-06-02 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSTimeZone.m: revert change of order of sources for zone
info since tzname does not appear to be more reliable than filename.
Allof timezone to be specified as an abbreviation rather than a name.
2010-06-02 Nicola Pero <nicola.pero@meta-innovation.com>
* configure.ac: Added --disable-setuid-gdomap option to disable

View file

@ -47,8 +47,8 @@
2) the GNUSTEP_TZ environment variable
3) the file LOCAL_TIME_FILE in _time_zone_path()
4) the TZ environment variable
5) tzset() & tznam[] for platforms which have it
6) TZDEFAULT defined in tzfile.h on platforms which have it
5) TZDEFAULT defined in tzfile.h on platforms which have it
6) tzset() & tznam[] for platforms which have it
7) Windows registry, for Win32 systems
8) or the fallback time zone (which is UTC)
with the ones listed first having precedence.
@ -895,8 +895,8 @@ static NSMapTable *absolutes = 0;
* 2) the GNUSTEP_TZ environment variable<br/ >
* 3) the file "localtime" in System/Library/Libraries/Resources/NSTimeZone<br/ >
* 4) the TZ environment variable<br/ >
* 5) tzset and tznam on platforms which have it<br/ >
* 6) The system zone settings (typically in /etc/localtime)<br/ >
* 5) The system zone settings (typically in /etc/localtime)<br/ >
* 6) tzset and tznam on platforms which have it<br/ >
* 7) Windows registry, on Win32 systems<br/ >
* 8) or the fallback time zone (which is UTC)<br/ >
* </p>
@ -1418,18 +1418,6 @@ static NSMapTable *absolutes = 0;
localZoneString = [[[NSProcessInfo processInfo]
environment] objectForKey: @"TZ"];
}
#if HAVE_TZSET
/*
* Try to get timezone from tzset and tzname
*/
if (localZoneString == nil)
{
localZoneSource = @"function: 'tzset()/tzname'";
tzset();
if (tzname[0] != NULL && *tzname[0] != '\0')
localZoneString = [NSString stringWithUTF8String: tzname[0]];
}
#endif
if (localZoneString == nil)
{
/* Get the zone name from the localtime file, assuming the file
@ -1488,6 +1476,18 @@ static NSMapTable *absolutes = 0;
localZoneString = nil;
}
}
#if HAVE_TZSET
/*
* Try to get timezone from tzset and tzname
*/
if (localZoneString == nil)
{
localZoneSource = @"function: 'tzset()/tzname'";
tzset();
if (tzname[0] != NULL && *tzname[0] != '\0')
localZoneString = [NSString stringWithUTF8String: tzname[0]];
}
#endif
#if defined(__MINGW__)
/*
@ -1515,6 +1515,10 @@ static NSMapTable *absolutes = 0;
{
NSDebugLLog (@"NSTimeZone", @"Using zone %@", localZoneString);
zone = [defaultPlaceholderTimeZone initWithName: localZoneString];
if (zone == nil)
{
zone = [[self timeZoneWithAbbreviation: localZoneString] retain];
}
if (zone == nil)
{
NSLog(@"Unable to create time zone for name: '%@' (source '%@').",