mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +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
20cde83f84
commit
30faeb91f9
2 changed files with 7 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
* Headers/Foundation/NSString.h: Add explicit warnings about OSX
|
||||
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>
|
||||
|
||||
|
|
|
@ -1526,13 +1526,16 @@ static NSMapTable *absolutes = 0;
|
|||
}
|
||||
#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)
|
||||
{
|
||||
localZoneSource = @"function: 'tzset()/tzname'";
|
||||
tzset();
|
||||
if (tzname[0] != NULL && *tzname[0] != '\0')
|
||||
if (NULL != tzname[0] && '\0' != *tzname[0] && 0 == daylight)
|
||||
localZoneString = [NSString stringWithUTF8String: tzname[0]];
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue