My guess now is 2021-03-14T02:24:47.841Z
isn’t a valid UTC time (not sure how to test this theory) so Swift throws an error. This would mean either: 1) The server isn’t on UTC time, or 2) It’s not producing a valid UTC time string. Switching the day/year slightly creates a valid UTC time string so it works. Are you able to verify if your server uses UTC?
All I can understand right now is that indeed, the returned time is not UTC. “2021-03-14T02:24:47.841Z” never existed (it is during the skipped hour) and therefore is an invalid date/time.
Let’s see what @davimacedo says about the server’s UTC response.
So I was on to something about the server not reporting a correct UTC time? Good to hear!
One thing you can try is to delete that user in the dashboard (I’m assuming it’s a dev server) and then create a new one by signing up. I’m guessing you will be fine now since that time passed…
Yup did that and it works! I’ve been playing around with other queries now… every time there’s a mismatch between the server response and the struct I get the same error. At least now I know more about the framework!
Since I was creating my records through the Parse Dashboard (the web interface), this all might actually be a dashboard bug if it’s just taking the browser’s local time and putting it in the createdAt field, and marking it as UTC.
Interesting and definitely a possibility…
There was a date encoding/decoding bug that was recently fixed in Parse Swift. The fix is in release 1.2.4 and may allow you to use dates entered from the dashboard.
I’ll update! I haven’t had any more date issues since my first bug.