Hello, I have allready tryed solutions from a few posts, but no luck. The problem is that i'm facing is probably whit time zones. Both on device and simulator UIDatePicker and NSDateFormatter are returning incorrect dates, adding or substracting the difference from GMT 0, from the selected date (according to the current time zone set on the device or mac).
I have allready tried setting locale and time zone but nothing worked. Any idea is wellcomed! Thanks.
(Haven't posted any code sample because both are initialized without setting any properties right now.)
UPDATE 1:
Here is the code snippet:
datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0.0, frame.size.height - 216.0, frame.size.width, 216.0)];
[self addSubview:datePicker];
....
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"EEE, MMM d, y h:mma"];
NSString *dateString = [formatter stringFromDate:datePicker.date];
[formatter release];