From 67ef77deeaaafca23fb45a05311fb8a17b7972f3 Mon Sep 17 00:00:00 2001 From: fedor Date: Sat, 16 Oct 2004 03:05:58 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ Source/NSCalendarDate.m | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c54e24ff..914c7aa5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-05 Georg Fleischmann + + * Source/NSCalendarDate.m [-initWithString:] Revert to previous + code, and try to load time zone abbreviation from name first. + 2004-10-15 Richard Frith-Macdonald * Source/GSHTTPURLHandle.m: Don't expect a baody where status is 204 diff --git a/Source/NSCalendarDate.m b/Source/NSCalendarDate.m index 927ce0a26..c7d58a885 100644 --- a/Source/NSCalendarDate.m +++ b/Source/NSCalendarDate.m @@ -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;