Skip to content

Commit

Permalink
Use local time in organization charges report, rather than UTC.
Browse files Browse the repository at this point in the history
For consistency with the late shift report and others.  Will later tie into
other timezone work related to #298.
  • Loading branch information
timparenti committed Apr 6, 2019
1 parent 87c5c43 commit fab09d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/reports/list_organization_charges_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ def sql
end

query.select('organizations.name AS \'Organization\'', 'charges.amount AS \'Amount\'',
'charge_types.name AS \'Charge Type\'', 'charges.charged_at AS \'Charged At\'',
'charge_types.name AS \'Charge Type\'',
'DATE_FORMAT(CONVERT_TZ (charges.charged_at, \'UTC\', \'US/Eastern\'), \'%m/%d/%Y %h:%i %p\') AS \'Charged At\'',
'charges.is_approved AS \'Approved\'',
'creating_participants_charges.andrewid AS \'Creator\'',
'participants.andrewid AS \'Issuer\'',
'(SELECT participants.andrewid FROM participants WHERE participants.id = charges.receiving_participant_id) AS \'Receiver\'',
'charges.description AS \'Description\'').to_sql
end
end
end

0 comments on commit fab09d4

Please sign in to comment.