Area:FoundationVersion/Build:iOS 11.3.1 and 11.1.2Summary:getting wrong DateTime Format In iPhone Device.we using DateTime format as yyyy-MM-dd HH:mm:ss and replace empty with Tand excepted result as 2018-07-13T15:07:36, but getting date time as 2018-07-13T3:07:36TPMSteps to Reproduce://Method to get DateTime String+ (NSString *)getCurrentLocalDateTime{ NSDate *localDate = [NSDate date]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSString *dateString = [dateFormatter stringFromDate:localDate]; dateString = [dateString stringByReplacingOccurrencesOfString:@" " withString:@"T"]; NSLog(@"CURR: %@", dateString); return dateString; // yyyy-MM-ddTHH:mm:ss}Expected Results:Output Data must be - 2018-07-13T15:07:36Actual Results:Actual Data - 2018-07-13T3:07:36TPMKindly reply ASAP..
7
0
7.4k