I have parsed a string into a date of format:
NSDateFormatter * ndf = [[NSDateFormatter alloc] init];
[ndf setDateFormat: @"yyyyDDDHHmmssz"];Create a date, call it debugDate as NSString*:
_aDate = [ndf dateFromString: debugDate];Set the flags for the NSDatePicker:
_dateDisplay.datePickerElements = NSHourMinuteSecondDatePickerElementFlag
| NSTimeZoneDatePickerElementFlag
| NSYearMonthDayDatePickerElementFlag
| NSEraDatePickerElementFlag;
// put date in
[_dateDisplay setDateValue: _aDate];This works fine. Except that I need the date/time displayed in GMT and the date picker puts the correct date out in local time.
The debugDate is: @"1998156063541GMT"
This shows up as 1998 JUNE 04 11:35:41 which is correct for PDT.
How do I force a NSDatePicker GMT display?
TIA
ClarkW