0
간단한 NSCalendar를 인스턴스화하고 시간대를 설정하려고해도 효과가없는 것 같습니다. 내가 여기서 뭔가를 놓치고 있니?NSCalendar에서 시간대가 설정되지 않음
NSCalendar *cal = [[NSCalendar alloc] init];
NSTimeZone *tz = [NSTimeZone timeZoneWithName:@"America/Denver"];
NSLog(@"tz:%@", tz);
//outputs: tz:America/Denver (MST) offset -25200
[cal setTimeZone: tz];
NSLog(@"[cal timeZone]:%@", [cal timeZone]);
//outputs: [cal timeZone]:(null)
cal.timeZone = tz;
NSLog(@"cal.timeZone:%@", cal.timeZone);
//outputs: cal.timeZone:(null)