bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix, NSCalendarDate


From: Georg Fleischmann
Subject: Fix, NSCalendarDate
Date: Sun, 11 Apr 2004 00:37:39 GMT

Hi,

here is a little fix for NSCalendarDate.
It avoids exceptions, when the time zone is created from an abbreviation.

Georg


2004-04-11  Georg Fleischmann
        * base/Source/NSCalendarDate.m
          [NSCalendarDate initWithString:calendarFormat:locale:]:
          avoid exception with time zone abbreviations


*** base/Source/NSCalendarDate.m.old    2004-03-09 17:59:59.000000000 +0100
--- base/Source/NSCalendarDate.m        2004-04-11 02:20:22.000000000 +0200
***************
*** 1083,1093 ****
                    {
                      NSString  *z = [NSString stringWithCString: tmpStr];

!                     tz = [NSTimeZone timeZoneWithName: z];
!                     if (tz == nil)
                        {
                          tz = [NSTimeZone timeZoneWithAbbreviation: z];
                        }
                    }
                    break;

--- 1083,1096 ----
                    {
                      NSString  *z = [NSString stringWithCString: tmpStr];

!                     if ([[NSTimeZone abbreviationDictionary] objectForKey: z])
                        {
                          tz = [NSTimeZone timeZoneWithAbbreviation: z];
                        }
+                     else
+                       {
+                         tz = [NSTimeZone timeZoneWithName: z];
+                       }
                    }
                    break;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]