Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7717715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:58:25+00:00 2026-06-01T02:58:25+00:00

This is solved, but I can’t mark it as such for 2 days. This

  • 0

This is solved, but I can’t mark it as such for 2 days.

This seems pretty basic. I’ve got a date coming from my server, mapping it to an NSDate, it picks it up and goes to map it and it SKIPS it!

    restkit.object_mapping:RKObjectMappingOperation.m:263 Mapping attribute value keyPath 'createdOn' to 'createdOn'
    restkit.object_mapping:RKObjectMappingOperation.m:125 Found transformable value at keyPath 'createdOn'. Transforming from type '__NSCFString' to 'NSDate'
    restkit.object_mapping:RKObjectMappingOperation.m:109 Transforming string value '2012-03-20T13:20:19.910Z' to NSDate...
    restkit.object_mapping:RKObjectMappingOperation.m:280 Skipped mapping of attribute value from keyPath 'createdOn to keyPath 'createdOn' -- value is unchanged ((null))

So later on, of course, my object has a nil for the NSDate.

I even tried putting in a default global formatter with this:

    [RKObjectMapping addDefaultDateFormatterForString:@"yyyy-MM-dd'T'HH:mm:ss.sss'Z'" inTimeZone:nil];

One problem I can see is that my date is formatted like this: 2012-03-20T13:20:19.910Z — notice the decimal seconds. I had hoped the above format would fix that.

How can I get RestKit to map my object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:58:26+00:00Added an answer on June 1, 2026 at 2:58 am

    The solution is:

    [RKObjectMapping addDefaultDateFormatterForString:@"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" inTimeZone:nil];
    

    notice the decimal seconds are SSS not sss.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I've solved this problem before, but I can't remember or find the
EDIT: This question is solved, but I can't accept my own answer just yet.
I feel like I've solved this problem 10 times before but I can never
I've read & tried a few posts but can't get this problem solved. I'm
HI, I have almost solved this but have now got stuck! What I need
I pretty much have this solved but for some reason the first If statement
wonder if anyone can help - I thought I had solved this but i
I've been trying to get this problem solved, but I can't seem to figure
This may be super easy to solve but I can't find the correct google
I can think of a few messy ways to solve this, but it strikes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.