w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Cannot translate date formats from rails form to mysql db

Most likely your timezone is not set correctly. Check which timezone your MySQL is using and which one your Rails is using.

You can try forcing a timezone in your rails app like this

class Application < Rails::Application
  config.time_zone = 'Eastern Time (US & Canada)'

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.