From fab09d4e96381dd71a75933e98a026bf422ed4d3 Mon Sep 17 00:00:00 2001 From: Tim Parenti Date: Sat, 6 Apr 2019 10:56:32 -0400 Subject: [PATCH] Use local time in organization charges report, rather than UTC. For consistency with the late shift report and others. Will later tie into other timezone work related to #298. --- app/reports/list_organization_charges_report.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/reports/list_organization_charges_report.rb b/app/reports/list_organization_charges_report.rb index 27f5fe4c..64d45901 100644 --- a/app/reports/list_organization_charges_report.rb +++ b/app/reports/list_organization_charges_report.rb @@ -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 \ No newline at end of file +end