Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

portem1

macrumors newbie
Original poster
Jan 18, 2011
9
0
It is on objective c soma Date and time format? Then i'm using:

Code:
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSDate *date1 = [dateFormatter dateFromString:@"2011-02-16 12:00:00"];
date1 becomes = 2011-02-16 10:00:00 GMT. So i can not use NSDate for date and time?
 
Last edited by a moderator:
How have you ascertained that the date has become 2011-02-16 10:00:00 GMT? What timezone are you in? As you did not specify the timezone when you created the date from the string the date will have been converted from your phones set timezone. If the timezone of the phone is currently GMT+2 then the two dates are actually the same.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.