Objective-C (iOS) の開発を行っています。デフォルトのタイム ゾーンを GMT +0 から GMT +8 に変更する方法を教えてください。GMT +8 はシンガポール用です。
これが私のコードです:
- (IBAction)dateChanged {
NSDate *choice = [datePick date];
NSString *words = [NSString alloc initWithFormat:@"%@", choice];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"You have selected:" message:words delegate:nil cancelButoonTitle:@"OK" otherBUttonTitles:nil, nil];
[alert show];
[alert release];
[words release];
}
ありがとう。