i trying convert mon, 01 aug 2016 04:15 pm ist
nsdate
i tried using below code stuck nil. please
nsstring *fulltime = @"mon, 01 aug 2016 04:15 pm ist"; nsdateformatter *dateformatter = [[nsdateformatter alloc]init]; [dateformatter setdateformat:@"eee, dd mmm yyyy hh:mm zzz"]; nsdate *temptime = [dateformatter datefromstring:fulltime];
you main issue ist
in date, ist
not standard , can stand many time zones:
ist indian standard time utc+05:30
ist irish standard time utc+01
ist israel standard time utc+02
the date formatter not able correctly format date since not know timezone meant.
if can should have date changed or remove ist
part date.
also need add locale date formatter knows in language used in date string. english beste use en_us_posix:
dateformatter.locale = [nslocale localewithlocaleidentifier:@"en_us_posix"];
Comments
Post a Comment