Checkin (via SIP) backdate voids one too many
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
Confirmed in Evergreen 2.6
SIP checkin at date 2014-06-07 with backdate of 2014-06-07. To avoid backdating billings created today, the circulation backdate code applies the usual logic of applying one fine interval duration to the backdate billing query. In this example, the logs show:
"applying backdate 2014-06-
Note the timezone offset of "00", which is a result of having no timezone in the date (yust YYYY-MM-DD). This tells DateTime to use the "Floating" time zone, which has the effect of using UTC time, which results in the voiding of a billing whose timestamp is 2014-06-07 23:59:59-04, because "2014-06-07 23:59:59-04" is greater than "2014-06-
The intention of the code which does this is to *not* void this billing, but since the backdate query date is UTC and the billing timestamp is local, it appears as though the billing should be voided.
--
One possible solution is to test the timezone of the backdate in CircCommon: