So does anyone know why the time is off when I input this code: [code]
NSDateComponents *comps = [[NSDateComponents alloc] init];
NSCalendar *g = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDate *dateOfBirth = [g dateFromComponents:comps]; NSLog(@"I was born on %@", dateOfBirth);[/code]
That I receive this output:
It should be “I was born on 1969-04-30 13:10:00 +0000”, no? OR does this have to do with UTC, and if I were coding a program where the date is important, would I have to compensate by inputting 6 instead of 13 to set the hour to 1:00 PM?