thoughtbreaker
thoughtbreaker

Reputation: 161

Help me with the NSDate format

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.

Upvotes: 0

Views: 499

Answers (2)

sosborn
sosborn

Reputation: 14694

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.

Upvotes: 1

NWCoder
NWCoder

Reputation: 5266

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

Upvotes: 0

Related Questions