LP#1552778: copy some date/time utils from OpenSRF
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 21 Sep 2018 15:00:25 +0000 (11:00 -0400)
committerKathy Lussier <klussier@masslnc.org>
Mon, 24 Sep 2018 18:41:03 +0000 (14:41 -0400)
commit8fa7940b570fbb22c478e31735959ce88fdce30d
treec57b6214faa2626a4abda8e1c0a0e11e042772eb
parent72152af78b20dee043b865f4471c0e066538e1a6
LP#1552778: copy some date/time utils from OpenSRF

As preparation for subsequent bugfixes, this patch
copies several date/time routines from OpenSRF::Utils
to a new module, OpenILS::Utils::DateTime. Specifically,
the routines copied over are:

* clean_ISO8601() (renaming of the OpenSRF cleanse_ISO8601)
* gmtime_ISO8601()
* interval_to_seconds()
* seconds_to_interval()

This move will allow us to fix bugs in this core routines
without requiring a mandatory OpenSRF upgrade. Furthermore,
with the exception of interval_to_seconds() (and in only one
place), none of those routines are used by OpenSRF itself.

To test
-------
[1] Apply the patch.
[2] Verify that unit tests pass.
[3] Verify that all Perl services start correctly.
[4] Verify that date/time and interval calculations continue
    to work as expected, particularly in circulation.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
39 files changed:
Open-ILS/src/offline/offline.pl
Open-ILS/src/perlmods/MANIFEST
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/ClosedDates.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/NonCat.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm
Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
Open-ILS/src/perlmods/lib/OpenILS/SIP/Item.pm
Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
Open-ILS/src/perlmods/lib/OpenILS/Utils/DateTime.pm [new file with mode: 0644]
Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm
Open-ILS/src/perlmods/lib/OpenILS/Utils/Penalty.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat/Feed.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm
Open-ILS/src/perlmods/live_t/03-overdue_circ.t
Open-ILS/src/perlmods/live_t/04-overdue_with_closed_dates.t
Open-ILS/src/perlmods/live_t/05-pay_bills.t
Open-ILS/src/perlmods/live_t/09-lp1198465_neg_balances.t
Open-ILS/src/perlmods/t/14-OpenILS-Utils.t
Open-ILS/src/support-scripts/generate_circ_notices.pl
Open-ILS/src/support-scripts/set_pbx_holidays.pl