Skip to content

Use timezone aware methods, fixes #26419

What does this MR do?

This MR uses timezone aware methods when dealing with time. It fixes Ticket #26419 (moved).

I removed the deactivated cop Rails/TimeZone in .rubocop_todo.yml.

It changes:

  • Time.new, Time.now to Time.zone.now
  • DateTime.parse, Time.parse to Time.zone.parse
  • Time.at to Time.zone.at

What are the relevant issue numbers?

Closes #26419 (moved)

/cc @adamniedzielski

Merge request reports