I have a UIDatePicker and a button. When I press the button I want to display in the log the message "Setting a reminder for x" where x is the time displayed by the date picker.
Everytime I press the button, the time logged is precisely 3 hours behind the time displayed by the picker (the time displayed by the picker is my current time). I suspect it has something to do with the time zone. I live in GMT +2 time zone (I guess it's +3 since we are in daylight saving time).
Do you have any idea how I could make the time logged to be the same as the time displayed?
Below is the method that gets executed when I press the button. Thanks.
- (IBAction)addReminder:(id)sender {
[self.datePicker setTimeZone:[NSTimeZone systemTimeZone]];
NSLog(@"Setting a reminder for %@", self.datePicker.date);
}