サーバ証明書内の有効期限(notAfter)等、GMT文字列をNSDateに変換する場合、timeZoneの設定が必要だった。
(当たり前のことだけど少しはまった。)
設定しないとその文字列がcurrentLocaleの文字列だと思って-9時間される。
NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease];
df.dateFormat = @"yyyyMMddHHmmss";
df.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];
(当たり前のことだけど少しはまった。)
設定しないとその文字列がcurrentLocaleの文字列だと思って-9時間される。
NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease];
df.dateFormat = @"yyyyMMddHHmmss";
df.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];