Checkin (via SIP) backdate voids one too many

Bug #1335939 reported by Bill Erickson
14
This bug affects 3 people
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-08T00:00:00-00 in overdue voiding"

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-08T00:00:00-00"

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::void_overdues() and if the date has a timezone of ' DateTime::TimeZone::Floating', then tell the date specifically to use the local time zone (e.g. $date->set_time_zone('local')). This way we don't clobber intentional time zones.

Tags: sip
tags: added: sip
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.