Skip to content

Instantly share code, notes, and snippets.

@giljr
Created May 13, 2023 22:32
Show Gist options
  • Save giljr/8d25f8994f5d90106db5605560a415d4 to your computer and use it in GitHub Desktop.
Save giljr/8d25f8994f5d90106db5605560a415d4 to your computer and use it in GitHub Desktop.
# https://stackoverflow.com/questions/6118779/how-to-change-default-timezone-for-active-record-in-rails
# 0 -To find your tz: rake time:zones:all
# 1- To run: bundle exec rake time:zones:all
# 2- To test: rails console > Time.zone and Time.now
config.time_zone = "Atlantic Time (Canada)"
config.active_record.default_timezone = :local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment