NSDate et al woes on iOS 4.2
问题 I believe that NSDate/NSCalendar has a bug or two on iOS 4.2. [[NSDate date] description] always prints using GMT, i.e. the local time zone setting is ignored. Has been reported previously, but is included to hopefully better explain the output below. [calendar ordinalityOfUnit:NSDayCalendarUnit inUnit:NSEraCalendarUnit forDate:dateA] Doesn't always return the correct value, while this does: [calendar ordinalityOfUnit:NSDayCalendarUnit inUnit:NSYearCalendarUnit forDate:dateA] Based on a