views:

44

answers:

1

I have tried numerous attemps of formatting a relatively simple date format to a date object, but also converting to my local time zone.

All dates are formatte like this: 2010-09-11T08:55:00. This is GMT time, and I want it converted to a date object with GMT+2.

Can anyone please point me in the right direction?

A: 

I just figured out how to format the date:

NSString *str = @"2010-09-10T18:24:43";

NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"];
NSDate *date = [format dateFromString:str];

[format setDateFormat:@"EEEE MMMM d, YYYY"];
str = [format stringFromDate:date];
[format release];

NSLog(@"%@", str);

Just need to convert to local timezone now..

rebellion