Skip to content

Commit

Permalink
Merge pull request #17606 from lpichler/remove_utc_conversion_from_re…
Browse files Browse the repository at this point in the history
…port_interval_in_chargeback

Remove conversion to UTC in Chargeback
(cherry picked from commit 9fe07d0)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1593677
  • Loading branch information
gtanzillo authored and simaishi committed Jun 21, 2018
1 parent 4f909bc commit e40b6fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/models/chargeback/report_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ def report_time_range
ts = Time.now.in_time_zone(tz)
case interval
when 'daily'
start_time = (ts - start_interval_offset.days).beginning_of_day.utc
end_time = (ts - end_interval_offset.days).end_of_day.utc
start_time = (ts - start_interval_offset.days).beginning_of_day
end_time = (ts - end_interval_offset.days).end_of_day
when 'weekly'
start_time = (ts - start_interval_offset.weeks).beginning_of_week.utc
end_time = (ts - end_interval_offset.weeks).end_of_week.utc
start_time = (ts - start_interval_offset.weeks).beginning_of_week
end_time = (ts - end_interval_offset.weeks).end_of_week
when 'monthly'
start_time = (ts - start_interval_offset.months).beginning_of_month.utc
end_time = (ts - end_interval_offset.months).end_of_month.utc
start_time = (ts - start_interval_offset.months).beginning_of_month
end_time = (ts - end_interval_offset.months).end_of_month
else
raise _("interval '%{interval}' is not supported") % {:interval => interval}
end
Expand Down

0 comments on commit e40b6fe

Please sign in to comment.