I'm trying to sethours in NSDateComponents, I wrote the following code
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *dateComps = [[NSDateComponents alloc] init];
[dateComps setDay:intDay];
[dateComps setMonth:intMonth];
[dateComps setYear:intYear];
[dateComps setHour:intHoures];
[dateComps setMinute:intMinutes];
NSDate *itemDate;
itemDate = [calendar dateFromComponents:dateComps];
NSLog(@"reminder date: %@", itemDate);
but when I set the hours as 13, it sets it as 11. I want hours in 24 style. Anyone can help me in this issue?
Thanks in Advance.