2

I am using mongoid for my rails app.

I want to set time zone for mongoid.

I tried with this in application.rb

config.mongoid.time_zone  = 'Kolkata'

but no luck. I also tried with this

use_utc: false
use_activesupport_time_zone: true

still it uses default time zone UTC.

rails 3.0.10

mongoid 2.2.4

please help.

thanks in advance.

Harshal_m_joshi
  • 1,489
  • 1
  • 16
  • 27

1 Answers1

4

in application.rb like this

config.time_zone = 'Kolkata'

and in mongoid.yml

use_activesupport_time_zone: true
abhas
  • 5,193
  • 1
  • 32
  • 56