diff --git a/darwin/datetimepicker.m b/darwin/datetimepicker.m index c7067af8..54c53b4b 100644 --- a/darwin/datetimepicker.m +++ b/darwin/datetimepicker.m @@ -126,14 +126,11 @@ void uiDateTimePickerTime(uiDateTimePicker *d, struct tm *time) time_t t; struct tm tmbuf; NSDate *date; - NSTimeInterval interval; date = [d->dp dateValue]; - interval = [[NSTimeZone systemTimeZone] secondsFromGMTForDate:date]; - date = [date dateByAddingTimeInterval:interval]; t = (time_t) [date timeIntervalSince1970]; - tmbuf = *gmtime(&t); + tmbuf = *localtime(&t); memcpy(time, &tmbuf, sizeof(struct tm)); }