An easy way to get rid of daylight saving time is to set the time zone to GMT. Then UIDatePicker will ignore daylight saving time:
_datePicker.TimeZone = NSTimeZone.FromAbbreviation("GMT");
Converting NSDate directly to and from DateTime is not bad in Monotouch, but you should be aware that NSDate is always UTC, and DateTimeK is set to DateTimeKind.Unspecified (when reading from the database) or DateTimeKind.Locale (when with DateTime by default. Today). The best way to convert without complicated calculations in time zones is to force the right DateTimeKind:
// Set date to the date picker (_date is a DateTime with time part 0:00:00):
_datePicker.Date = DateTime.SpecifyKind(_date, DateTimeKind.Utc);
// Get the date from the date picker:
_date = DateTime.SpecifyKind(_datePicker.Date, DateTimeKind.Unspecified);
This is simpler and more reliable than getting individual Day, Month, and Year values.
source
share