Tag Archives: Unicode

NSDateFormatter case sensitive trap

Though NSDateFormatter behaves slightly different than documented, the following might even be correct, as strange as it might look (mind the last two lines): -(void)testNSDateFormatterTrap { NSDateFormatter *lower = [[[NSDateFormatter alloc] init] autorelease]; lower.dateFormat = @"yyyy-MM-dd HH:mm:SS ZZZ";   NSDateFormatter *upper = [[[NSDateFormatter alloc] init] autorelease]; upper.dateFormat = @"YYYY-MM-dd HH:mm:SS ZZZ";   lower.timeZone = upper.timeZone […]