diff --git a/AFIncrementalStore/AFRESTClient.m b/AFIncrementalStore/AFRESTClient.m index e3a32b3..f69e1d7 100644 --- a/AFIncrementalStore/AFRESTClient.m +++ b/AFIncrementalStore/AFRESTClient.m @@ -180,7 +180,7 @@ - (NSDictionary *)attributesForRepresentation:(NSDictionary *)representation if ([(NSAttributeDescription *)obj attributeType] == NSDateAttributeType) { id value = [mutableAttributes valueForKey:key]; if (value && ![value isEqual:[NSNull null]] && [value isKindOfClass:[NSString class]]) { - [mutableAttributes setValue:[[NSValueTransformer valueTransformerForName:TTTISO8601DateTransformerName] transformedValue:value] forKey:key]; + [mutableAttributes setValue:[[NSValueTransformer valueTransformerForName:TTTISO8601DateTransformerName] reverseTransformedValue:value] forKey:key]; } } }]; diff --git a/Examples/Twitter Client/Classes/AppDotNetAPIClient.m b/Examples/Twitter Client/Classes/AppDotNetAPIClient.m index 1578b95..76daa5b 100644 --- a/Examples/Twitter Client/Classes/AppDotNetAPIClient.m +++ b/Examples/Twitter Client/Classes/AppDotNetAPIClient.m @@ -90,7 +90,7 @@ - (NSDictionary *)attributesForRepresentation:(NSDictionary *)representation NSMutableDictionary *mutablePropertyValues = [[super attributesForRepresentation:representation ofEntity:entity fromResponse:response] mutableCopy]; if ([entity.name isEqualToString:@"Post"]) { [mutablePropertyValues setValue:[NSNumber numberWithInteger:[[representation valueForKey:@"id"] integerValue]] forKey:@"postID"]; - [mutablePropertyValues setValue:[[NSValueTransformer valueTransformerForName:TTTISO8601DateTransformerName] transformedValue:[representation valueForKey:@"created_at"]] forKey:@"createdAt"]; + [mutablePropertyValues setValue:[[NSValueTransformer valueTransformerForName:TTTISO8601DateTransformerName] reverseTransformedValue:[representation valueForKey:@"created_at"]] forKey:@"createdAt"]; } else if ([entity.name isEqualToString:@"User"]) { [mutablePropertyValues setValue:[NSNumber numberWithInteger:[[representation valueForKey:@"id"] integerValue]] forKey:@"userID"]; [mutablePropertyValues setValue:[representation valueForKey:@"username"] forKey:@"username"];