Ruby – in_time_zone

Have gotten into the habit of using the in_time_zone ruby function for my projects and setting the time zone at the user level.

Earlier on in my web developer career, I had a lot of trouble with dealing different time zones for a variety of users who may not be local to the server or web application. I would make efforts to try and detect the location of the user, however, that didn’t really provide a consistent result.

In the end, I put the responsibility on the user to set the time zone themselves.

Leave a comment