I have a Song model which contains hundreds of thousands of songs, when I do queries using AR the time format (when rendered to json) is like this: 2011-12-19T11:04:39Z.
When I execute a query using Song.connection.execute()
the time format returned when rendering to json is like this: 2011-11-20 19:00:08.207467
I actually prefer the raw format which is returned from the connection.execute()
call. How can I make it so AR consistently does not convert it? How would I set the correct time zone etc?
I basically want to make sure its always in the same format when requests either through a raw db call and through AR.