Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.5+ cant parse default RoR JSON date format #88

Open
robj opened this issue Oct 29, 2013 · 2 comments
Open

0.4.5+ cant parse default RoR JSON date format #88

robj opened this issue Oct 29, 2013 · 2 comments

Comments

@robj
Copy link
Contributor

robj commented Oct 29, 2013

(main)> MotionModel::DateParser.parse_date('2012-04-23T18:25:43.511Z')
2013-10-29 17:09:35.489 stud[71594:80b] date_parser.rb:8:in parse_date:': undefined methoddate' for nil:NilClass (NoMethodError)

removing 'T" from the string:

=> #<NoMethodError: undefined method `date' for nil:NilClass>
(main)> MotionModel::DateParser.parse_date('2012-04-23 18:25:43.511Z')
=> 2012-04-24 04:25:43 +1000

Here is more info on JSON date formatting:

http://stackoverflow.com/questions/10286204/the-right-json-date-format

@sxross
Copy link
Owner

sxross commented Oct 29, 2013

Can you clone master and write a failing spec?

Thanks

@sxross
Copy link
Owner

sxross commented Nov 2, 2013

I'm looking into the NSMoment Cocoapod for date conversions. This may solve some of the issues we're seeing with date conversions. I've never been completely happy with that. A failing spec would really be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants