LP#
2051599: fix parsing of start and end dates by Cash Reports
This patch fixes a bug where if you open the Cash Reports at a
time of day where the date in the local time zone is different
from the date in UTC and do not interact with the date selectors,
the report will not display payments made during the current day.
The problem was due to the use of Date.toISOString() when
attempting to extract just the date component; since Date.toISOString()
forces the timestamp to UTC. The effect is that if you (say) open
the Cash Reports page in North America sufficiently late in the date,
the date selectors will display your current date, but the query
to fetch payment information will (silently) supply the following day.
To test
-------
[1] Make some patron bill payments.
[2] Open the Cash Reports at a time of day when an UTC clock would
report a different date from your local date. Observe that no
payments are listed or that payments from the previous day are
listed.
[3] Apply the patch and repeat step 2. This time, opening the Cash
Reports page should show the payments for the current day.
Release-note: Fix bug that could cause the Cash Reports page to display payments for the wrong day.
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>