I'm having an issue with the Monotouch UIDatePicker being 1 hour behind. I think this is to do with Time Zones or something similar. I've tried explicitly setting the TimeZone and Locale of my UIDatePicker but this doesn't seem to be helping.
datePicker.Locale = NSLocale.CurrentLocale;
datePicker.TimeZone = NSTimeZone.LocalTimeZone;
In the ValueChanged handler the following line returns a value 1 hour earlier than the time selected in the user interface:
var date = DateTime.SpecifyKind((s as UIDatePicker).Date, DateTimeKind.Local).ToLocalTime();
In the ValueChanged Handler I've double checked that the Locale and TimeZone is the same as what was set. The TimeZone is Europe/Dublin and Locale en_US. This information was retrieved by:
datePicker.Locale.LocaleIdentifier;
datePicker.DatePicker.TimeZone;
Is there another step I'm missing?
Thanks!