Skip to content

Commit

Permalink
Merge pull request #59 from joeltay17/master
Browse files Browse the repository at this point in the history
Fixed null date values by explicitly setting NSDate locale en_US_POSIX. Fixes #57.
  • Loading branch information
hpique committed Mar 6, 2014
2 parents dcc579b + 70fbe18 commit cb3a4c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions RMStore/Optional/RMAppReceipt.m
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ + (NSDate*)formatRFC3339String:(NSString*)string
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
formatter = [[NSDateFormatter alloc] init];
[formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]];
formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ssZ";
});
NSDate *date = [formatter dateFromString:string];
Expand Down

0 comments on commit cb3a4c5

Please sign in to comment.