I have problems with NSDate to NSString conversion, I have the following code in a method
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
[formatter setTimeZone:timeZone];
[formatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'zzz'"];
return [formatter stringFromDate:date];
If I´m not mistaken this should return a String like
"2016-01-15T22:45:40.GMT"
But the resulting string depends on the device configuration, meaning if the device shows the date as 24 hour then i get the result above, on the other hand if the device is configured to show the house as A.M. P.M. then I get
"2016-01-15T10:46:50 p.m..GMT"