Use Date.current instead of Date.today in RailsAdmin duration filters
Problem
While working on the fix for https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/4866 it was mentioned that a couple of the duration filters provided by RailsAdmin (today
and this_week
) use Date.today
instead of Date.current
to calculate their corresponding time ranges.
Proposal
Since we already added a patch for the default datetime filter, determine if it's worth updating the today
and this_week
filters in our code to use Date.current
.
If it is, make the necessary updates to the code and the specs.
Result
Datetime filters that correctly use our Rails app timezone configuration.