This project is archived and is in readonly mode.
Bug in Time#to_json
-
Geoff Buesing
I can't reproduce this with a fresh Rails 2.3.3 app:
$ script/console Loading development environment (Rails 2.3.3) >> Time.now => Tue Aug 18 08:11:36 -0500 2009 >> Time.now.to_json => "\"2009-08-18T08:11:39-05:00\""Do you have any plugins installed that would be adjusting Time#to_json or #xmlschema? Also, are you setting ActiveSupport.use_standard_json_time_format = true in config/initializers/new_rails_defaults.rb?
Fyi the JSON gem doesn't define a specific Time#to_json by default; that's just a JSON version of its #to_s output.
-
Andrew
Sorry, you're right. I should have checked this on a fresh install.
I have found the offending plugin and will fix it there.Thanks very much
-
Geoff Buesing
- State changed from new to invalid