This strange issue appeared with ios 8 release. Here is sample code:
NSDate * date = [NSDate dateWithTimeIntervalSince1970:1414785600];
dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"ru_RU"]];
[dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"Europe/Moscow"]];
[dateFormatter setDateStyle:NSDateFormatterFullStyle];
[dateFormatter setDateFormat:@"MM"];
NSString * month = [dateFormatter stringFromDate: date];
Date is 2014-11-01 00:00:00 MSK
(or 2014-10-31 20:00:00 +0000
)
Running ios 7, month value is 11. But on ios 8 it is 10. Any ideas what's wrong? Thanks.
PS. Checking Asia/Muscat timezone right now (+4 like MSK). Everything is OK, month is 11.