Handling Timezone in MySQL queries in a Rails application

Handling timezones in Rails applicationsIn the Rails application, we may have two different timezones. Application timezoneDatabase timezoneIn most of the cases database timezone is set to UTC, but application timezone could be different from database timezone. How to set application timezone?Set timezone at the application levelWe can set  config.time_zone configuration in config/application.rb file. ActiveRecord fetches UTC from the database and converts it to the timezone specified in config.time_zone. Refer this article in case you need help with setting up timezone at application level. 2. Set the timezone based on the one specified by