Setting custom timezone for config.active_record.default_timezone

I’m using a Rails application to access a database from a legacy
application. This application stores all datetime fields using
Europe/Madrid timezone.

From what I’ve seem, it’s only possible to set
config.active_record.default_timezone to :utc (default) or :local which
uses the OS timezone.

Since I cannot guarantee that my OS timezone will always be
Europe/Madrid,
I would like to set a specific timezone for active record.

Is there another of doing this?

Thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs