mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Attempt timezone name parsing fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8022 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f8c3aed237
commit
c19fd6da52
2 changed files with 19 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2000-11-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSCalendarDate.m ([NSCalendarDate -initWithString:
|
||||
calendarFormat:locale:]): try getting timezone by name before
|
||||
attempting by abbreviation - thus preserving exact name isf possible.
|
||||
|
||||
2000-11-03 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
||||
|
||||
* Source/NSCalendarDate.m ([NSCalendarDate -initWithString:
|
||||
|
|
|
@ -659,11 +659,19 @@ static inline int getDigits(const char *from, char *to, int limit)
|
|||
}
|
||||
tmpStr[tmpIdx - sourceIdx] = '\0';
|
||||
sourceIdx += tmpIdx - sourceIdx;
|
||||
if ((tz = [NSTimeZone timeZoneWithAbbreviation:
|
||||
[NSString stringWithCString: tmpStr]]) == nil)
|
||||
{
|
||||
tz = [NSTimeZone localTimeZone];
|
||||
}
|
||||
{
|
||||
NSString *z = [NSString stringWithCString: tmpStr];
|
||||
|
||||
tz = [NSTimeZone timeZoneWithName: z];
|
||||
if (tz == nil)
|
||||
{
|
||||
tz = [NSTimeZone timeZoneWithAbbreviation: z];
|
||||
}
|
||||
if (tz == nil)
|
||||
{
|
||||
tz = [NSTimeZone localTimeZone];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue