Question

I have timestamps in my model created with t.timestamps command in the migration.

If I look in the database directly, the milliseconds are stored correctly. But when I fetch the object the milliseconds are not there.

Model.first.updated_at.iso8601(3)
 => "2013-09-28T13:43:58.000Z" 

Why isn't the milliseconds fetched from the database?

Was it helpful?

Solution

The problem was not Rails, it was the Ruby 2.0.0-p247 binary on OS X that had a bug:

https://github.com/wayneeseguin/rvm/issues/2189

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top