我用印度时区的GHM格式计算了我们的系统时间,但它显示了5小时的差异
发布于 2015-03-26 13:33:08
从服务器获取数据并转换为GMT格式,并与当地时区GMT时间(设备时间)进行比较。
 //Assuming the dateString is in GMT+00:00
    NSTimeZone *timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
    [formatter setTimeZone:timeZone];
    [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    NSDate *date =[formatter dateFromString:dateString];https://stackoverflow.com/questions/29271117
复制相似问题