Any way to get the abbreviation from timezone (e.g. UTC, EET) from NSDate? I get an NSDate from a string, for example, 2012-08-26 02:54:50 +0200 and I need to show the time zone of this date.
Currently it is:
NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat: @"yyyy-MM-dd HH:mm:ssZZZ"];
NSDate *isoDate = [formatter dateFromString: isoTime.value];
NSInteger offset = [[NSTimeZone defaultTimeZone] secondsFromGMTForDate: isoDate];
NSTimeZone *timeZone = [NSTimeZone timeZoneForSecondsFromGMT: offset];
But I get GMT + 03: 00 for the abbreviation timeZone, but it should be EET. Any way to get it?
source
share