//根据系统设置时区显示时间
NSTimeZone *tz=[NSTimeZone systemTimeZone];
NSDateFormatter* f = [[NSDateFormatter alloc] init];
[f setTimeZone:tz];
[f setDateFormat:formatter];
NSString* s=[f stringFromDate:date];
[f release];
return s;
//根据指定时区设置时间显示
NSDateFormatter* f = [[NSDateFormatter alloc] init];
[f setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"UTC"]];
[f setDateFormat:@"yyyy-MM-dd"];
NSString* s = [f stringFromDate:date];
[f release];
return s;
//查看时区对应关键字
CFShoww(
[NSTimeZone abbreviationDictionary] );