-2

I will appreciate if someone could please advise me what is wrong with the date formatting. I have the following date as string from webservice :

20141211200300 //yyyyMMddHHmmss -->2014/12/11 20:03:00

But when I format it using the following format it adds 2 hrs

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyyMMddHHmmss"];
NSDate *date = [dateFormatter dateFromString:localDate];

The output I get in console is

2014-12-11 10:03:00 +0000

I tried adding GMT timezone as well as Australia/Brisbane still get the same issue.

snowflakes74
  • 1,307
  • 1
  • 20
  • 43

1 Answers1

0

You did not show the code that printed the number. If you used NSLog() there is probably a time zone issue, Note that the printed time is in GMT. Is your time zone two hours from GMT?

zaph
  • 111,848
  • 21
  • 189
  • 228