UTC time and local time

Background

All times (and datetimes?) are stored in the database in UTC time by Rails/ActiveRecord. (i.e., the times are converted to UTC, if they aren't already UTC, before saving)

When retrieving times from the database, they are always in UTC.

Presently the AV website displays and captures all times in UTC.

The events controller and model have start times and start dates in many places.  I don't know about other sections of the website.

User Stories

The user wants to specify event times (start/end) in local time.

The user wants to view all times in local time.

How to handle

There is an easy to use gem that includes javascript by basecamp to display dates & times in the user's localtime:  https://github.com/basecamp/local_time

For users without JS, we can show the times in UTC for them... and explicitly ask them for their timezone when they login.

To convert the user's date_time from their localtime to UTC, we could store the time difference in the session hash after retrieving it from the user upon login, and then use it as needed.  (I think that Paul recommended this).


Nik is working on the display in localtime feature, I believe, perhaps using geolocation.