Skip to content

Commit

Permalink
Merge pull request #18 from SanggeonPark/develop
Browse files Browse the repository at this point in the history
Fix bug in dateWithMilliSecondsTimeIntervalFromResponseDictionary
  • Loading branch information
Sanggeon Park committed Mar 10, 2014
2 parents cd93f21 + 90a36ec commit 085bc93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ json2yaml -d 5 test.json > test.yaml

## Documentation

See MetaJSONProtocol.md file in the doc folder.
See [MetaJSONProtocol.md](doc/MetaJSONProtocol.md) file in the doc folder.

## Known issues
Please check the issue tracker and/or refer to the known_issues.md file in the doc folder.
Please check the issue tracker and/or refer to the [known_issues.md](doc/known_issues.md) file in the doc folder.

## License
The project is published with the MIT License. Please read the LICENSE.txt for more details.
The project is published with the MIT License. Please read the LICENSE.txt for more details.
4 changes: 2 additions & 2 deletions templates/APIParser/APIParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ +(NSDate*)dateWithMilliSecondsTimeIntervalFromResponseDictionary:(id)responseObj
return nil;
}

NSNumber *timeInterval = [NSNumber numberWithLongLong:(dateNumber.longLongValue / 1000)];
NSNumber *timeInterval = [NSNumber numberWithDouble:(dateNumber.doubleValue / 1000)];

if (*error || !timeInterval || ![timeInterval isKindOfClass:[NSNumber class]])
{
Expand All @@ -588,7 +588,7 @@ +(NSDate*)dateWithMilliSecondsTimeIntervalFromResponseDictionary:(id)responseObj
return nil;
}

NSDate *date = [NSDate dateWithTimeIntervalSince1970:[timeInterval longLongValue]];
NSDate *date = [NSDate dateWithTimeIntervalSince1970:[timeInterval doubleValue]];

return date;
}
Expand Down

0 comments on commit 085bc93

Please sign in to comment.