0

Am in need of making the date format in the correct manner. Right now am gettin my

NSDate *dateObject = [NSDate date];
2011-03-15 05:47:12 +0000

I want to know why this date is showing the GMT date as +0000. I really want to make it as the real GMT date from where the user hits the app.

Any comments regarding this is appreciable. Thanks.

thoughtbreaker
  • 161
  • 1
  • 10

2 Answers2

1

There are several ways to do this. The easiest is to use NSDate's descriptionWithLocale function. You can also use Date Formatters or NSDate's descriptionWithCalendarFormat:timeZone:locale: function.

sosborn
  • 14,676
  • 2
  • 42
  • 46
0

NSLocale does that job, I think the default renders from currentLocale settings.

NWCoder
  • 5,296
  • 1
  • 26
  • 23