0

I am developing an app in Rails 3.2 that will be used locally. For example, if the user sets that an event starts at 16:00 then whenever they retrieve it it should be 16:00.

What is the best way to configure this in Rails and is it a good idea? It seems no matter what I set, the time changes when either being stored in the database or when being pulled.

I am using MySQL on my backend.

Matt McCormick
  • 13,041
  • 22
  • 75
  • 83

2 Answers2

0

I don't think you should be concerned about your time if the app is going to be used only locally. It will be transparent to the users. If your values are incorrect you might have problems that, I believe, have nothing to do about how Rails calculates DateTime or Time values.

pepe
  • 555
  • 4
  • 8
0

store user time zones in the user table. for all event time data store as a specific time zone (eg UTC?) and then convert accordingly every time you store/pull that data for the user.

Julian
  • 483
  • 1
  • 6
  • 17