mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
minor tweak to fallback
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33222 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
67e6a7d476
commit
ba720e4293
2 changed files with 7 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
* Headers/Foundation/NSString.h: Add explicit warnings about OSX
|
* Headers/Foundation/NSString.h: Add explicit warnings about OSX
|
||||||
compatible modifications to values returned by path methods.
|
compatible modifications to values returned by path methods.
|
||||||
|
* Source/NSTimeZone.m: Don't guess at tzname[0] if the value of
|
||||||
|
daylight shows it's not valid.
|
||||||
|
|
||||||
2011-05-31 Niels Grewe <niels.grewe@halbordnung.de>
|
2011-05-31 Niels Grewe <niels.grewe@halbordnung.de>
|
||||||
|
|
||||||
|
|
|
@ -1526,13 +1526,16 @@ static NSMapTable *absolutes = 0;
|
||||||
}
|
}
|
||||||
#if HAVE_TZSET
|
#if HAVE_TZSET
|
||||||
/*
|
/*
|
||||||
* Try to get timezone from tzset and tzname
|
* Try to get timezone from tzset and tzname/daylight.
|
||||||
|
* If daylight is non-zero, then tzname[0] is only the name
|
||||||
|
* the the zone for part of the year, so we can't use it as
|
||||||
|
* the definitive zone.
|
||||||
*/
|
*/
|
||||||
if (localZoneString == nil)
|
if (localZoneString == nil)
|
||||||
{
|
{
|
||||||
localZoneSource = @"function: 'tzset()/tzname'";
|
localZoneSource = @"function: 'tzset()/tzname'";
|
||||||
tzset();
|
tzset();
|
||||||
if (tzname[0] != NULL && *tzname[0] != '\0')
|
if (NULL != tzname[0] && '\0' != *tzname[0] && 0 == daylight)
|
||||||
localZoneString = [NSString stringWithUTF8String: tzname[0]];
|
localZoneString = [NSString stringWithUTF8String: tzname[0]];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue