Dobry,
Thanks for starting this thread. I've been challenged by this as well. Since my app is frequently used for tracking time across time zones, this is a big problem for me. In viewWillAppear:
Code:
datePicker.timeZone = [NSTimeZone localTimeZone];
Setting localTime Zone improved the situation, but the problem cropped up again. I played around with a number of things and I get the most consistent results with:
Code:
datePicker.timeZone = [NSTimeZone defaultTimeZone];
Although Today (as displayed in blue on the picker) is not always correct, the correct date is displayed when the time zone changes. Quitting the app and starting up again (iOS 4) always restores the correct behavior to the datePicker. So this problem is only a problem for me because the app is "freeze dried", the time zone changes, the app is brought to the foreground and the datePicker doesn't update for the new localTimeZone.
John