Use timezone aware methods for dealing with time

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Description

We have many places in the codebase where we use methods for dealing with time and dates that come from Ruby and are not aware of the configured application timezone. These are for example Time.now, Time.parse and Time.at. This works fine if the server timezone is the same as the configured timezone, but will cause troubles if it's not the case.

Proposal

Replace methods that are not timezone aware with methods that are timezone aware. The list is in references.

Links / references

  • http://danilenko.org/2012/7/6/rails_timezones/
  • https://robots.thoughtbot.com/its-about-time-zones#a-summary-of-do39s-and-don39ts-with-time-zones
Edited Sep 29, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading