iOS 解决时间拾取器 datePicker 时区问题

iOS 解决时间拾取器 datePicker 时区问题,需设置模拟器中的时区

NSDateFormatter *fm=[[NSDateFormatter alloc]init];
    [fm setDateFormat:@"yyyy-MM-dd hh-mm-ss"];
    NSString *message=[NSString stringWithFormat:@"当前时间为 %@",[fm stringFromDate:[dataPicker date]]];
    UIAlertView *view=[[UIAlertView alloc]initWithTitle:@"Time" message:[NSString stringWithFormat:message,[dataPicker date]] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
    [view show];
    [view release];


你可能感兴趣的:(iOS 解决时间拾取器 datePicker 时区问题)