sanger/lims-core — pull request #212 by llh1 (2013-10-22 15:44:27+00:00)
Title: Use time_format option when using Oj

Example of the bug with Oj and a DateTime object:

1.9.3p392 :002 > h = {:a => {:b => {:date => Time.now.utc}}}
=> {:a=>{:b=>{:date=>2013-10-22 15:38:46 UTC}}}
1.9.3p392 :014 > Oj.dump h, :mode => :compat
=> "{\"a\":{\"b\":{\"date\":1382456326.732787000}}}" << NOT EXPECTED
1.9.3p392 :015 > Oj.dump h, :mode => :compat, :time_format => :ruby
=> "{\"a\":{\"b\":{\"date\":\"2013-10-22 15:38:46 UTC\"}}}"