mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
* Source/NSCalendarDate.m [-initWithString:] Revert to previous
code, and try to load time zone abbreviation from name first. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20227 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
64ff173e3a
commit
67ef77deea
2 changed files with 10 additions and 5 deletions
|
@ -1132,14 +1132,14 @@ static inline int getDigits(const char *from, char *to, int limit)
|
|||
{
|
||||
NSString *z = [NSString stringWithCString: tmpStr];
|
||||
|
||||
if ([[NSTimeZone abbreviationDictionary] objectForKey: z])
|
||||
/* Abbreviations aren't one-to-one with time zone names
|
||||
so just look for the zone named after the abbreviation,
|
||||
then look up the abbreviation as a last resort */
|
||||
tz = [NSTimeZone timeZoneWithName: z];
|
||||
if (tz == nil)
|
||||
{
|
||||
tz = [NSTimeZone timeZoneWithAbbreviation: z];
|
||||
}
|
||||
else
|
||||
{
|
||||
tz = [NSTimeZone timeZoneWithName: z];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue