NSLog
shows the dates using -[NSDate description]
which, in turn, converts the absolute time stored in the NSDate
to a string. This conversion is done using UTC as the time zone.
For you case it's probably best to do the date calculations in UTC as well. To do so adjust the calendar object that does the calculations:
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
[gregorian setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"UTC"]];