Skip to content


Subversion checkout URL

You can clone with
Download ZIP


parsedDate is nil on MagicalImportFunctions when changing iphone settings #700

aminebellakrid opened this Issue · 2 comments

2 participants


I have in my model a Date field "startTime" and in the userInfo :


So this is working and the parsed time is the right one.

But if you go to your iphone's

settings > general > date&time > enable 24-Hour Time. 

then relaunch my app crashes because parsedDate is nil in :

// In MagicalImportFunctions.m 

NSDate * dateFromString(NSString *value, NSString *format)
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
    [formatter setLocale:[NSLocale currentLocale]];
    [formatter setDateFormat:format];

    NSDate *parsedDate = [formatter dateFromString:value];

    return parsedDate;

I am using 2.2 release .
I guess it's a date format issue but i don't know how to handle it. Any thought on this please @casademora @blackgold9 @tonyarnold ?



See how you go with the workaround in #627, otherwise have a look at the tests included with MagicalRecord. Let me know if your workaround works OK.

@tonyarnold tonyarnold closed this

:+1: Alright thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.