#define stdDateFormat @\"YYYYMMdd\'T\'hh:mm:ssZ\" NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init]; [dateFormat setDateFormat:stdDateFormat]; NSString *Ti
Use lowercase yyyy for the year instead of YYYY.
Uppercase Y means the year of the start of the week the date is in (Jan 3, 2009 is in a week that starts in 2008).
See Unicode Date Format Patterns.