Question

I need to convert the following format into a new format using NSDateFormatter.

'Fri, 25 Mar 2011 10:16:00 -0700'.

I tried using "aaa, dd bbb YYYY HH:MM:SS ZHHMM" as format, but it doesn't work; it gives me a date way in the past.

I also need to convert it into the Eastern Time Zone when creating a new date.

The code I used is the following one:

NSDateFormatter *newDateFormatter = [[NSDateFormatter alloc] init]; 
[newDateFormatter setDateFormat:@"dd MMM YYYY HH:mm:SS"];

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top