Before I updated Rails, the default Time format the API was returning was yyyy-MM-dd'T'HH:mm:ss'Z'
. Now it returns yyyy-MM-dd'T'HH:mm:ss:sss'Z'
. I want to change it back due to apps that rely on the old time format. How can I change this PROJECT default format that Time::DateTime
's to_s
method returns?
Edit:
I should probably mention I started using the active_model_serializer
gem. Not sure if that makes a difference. My guess is this change happened after the update from Rails 4.0.x to 4.1.x. Also I want to change this format for the project. This format changed between Rails versions. active_model_serializer
uses to_s
, so it makes more sense to override how to project sets this. I don't know where that is.