Configure UIDatePicker with current locations time
- by Telkitty
I am using UIDatePicker in my current app, here is how I set a UILabel with the date time string obtained from the UIDatePicker.
-(IBAction)AddTimeEnd:(id)sender
{
NSDate * date = [m_DateTimePicker date];
m_DateTimeLabel.text = [date description];
}
Somehow the time I have entered (EST) kept on getting converted to US time in the UILabel. Does anyone know how to fix it? I would like the time entered in UIDatePicker to be consistent with the text in the label (probably the simplest way is set the locale for the UIDatePicker to be the local timezone)?