Is it possible to configure rails to serialize datetime to json always in utc without timezone?
For example: instead "2011-06-15T21:40:05+06:00" i want "2011-06-15T15:40:05+00:00"
To set the time zone for the entire application add this line to environment.rb
config.time_zone = 'UTC'
To set the time-zone before a render call
Time.zone = 'UTC'
render
Note: These instructions pertains to Rails 2.3x
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With