When i try to convert a NSString to NSDate... setDateFormat return me 3 hours more!
Example
NSDateFormatter *inFormat2 = [[NSDateFormatter alloc] init];
[inFormat2 setDateFormat:@"MM/dd/yyyy HH:mm:ss"]; //MM/dd/yyyy/
NSDate *seekLightStart = [inFormat2 dateFromString:@"01/01/2001 06:37:35"];
NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init];
[inputFormatter setDateFormat:@"yyyy-MM-dd 'at' HH:mm"];
NSDate *formatterDate = [inputFormatter dateFromString:@"1999-07-11 at 10:30"];
seekLightStart --> 01/01/2001 9:37:35 formatterDate ---> 07/11/1999 13:30
why ??
NSDateFormatter has a timeZone property. When you use -dateFromString:, it uses this and the other state properties to generate the resulting NSDate object. I would guess that the default time zone is not your time zone and is the source of your error.
NSTimeZone: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSTimeZone_Class/Reference/Reference.html