[koha-commits] main Koha release repository branch master updated. v16.11.00-33-g32354d8

Git repo owner gitmaster at git.koha-community.org
Fri Dec 9 16:28:17 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, master has been updated
       via  32354d8322afd05704d87cb38d9bc032ce8c4ec1 (commit)
       via  c6a0848ff0b7acbec4d7bf817447d7cc84c0615e (commit)
      from  d0b6197709f468aac6157c9901acc89be48e304f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 32354d8322afd05704d87cb38d9bc032ce8c4ec1
Author: David Cook <dcook at prosentient.com.au>
Date:   Mon May 23 11:57:04 2016 +1000

    Bug 16376 - Koha::Calendar->is_holiday date truncation creates fatal errors for TZ America/Santiago
    
    Using a DateTime object with a timezone of America/Santiago
    was causing fatal errors for Koha::Calendar->is_holiday
    and Koha::Calendar->exception_holidays, when the objects
    were truncated to an invalid local time.
    
    Using a floating zone allows us to use the same day, month, year
    for comparison purposes without running into the possibility of
    creating an invalid local time and thus a fatal software error.
    
    Edit:
    
    While the changes to is_holiday and single_holiday make sense (Jonathan agrees too)
    I didn't manage to have them fail, because truncate is not failing in my trials, but
    days_between. So to me, it narrows down to have exception_holiday return floating tz
    datetime objects so it doesn't break days_between.
    
    Anyway, it is ok to push this patch, and the regression test I provide covers this scenario
    I'm describing.
    
    To test:
    - Apply the regression tests patch
    - Run:
      $ prove t/db_dependent/Holidays.t
    => FAIL: Unexpected error due to bad timezone/date combination
    - Apply this patch
    - Run:
      $ prove t/db_dependent/Holidays.t
    => SUCCESS: Tests pass
    
    Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

commit c6a0848ff0b7acbec4d7bf817447d7cc84c0615e
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Tue Dec 6 11:29:08 2016 -0300

    Bug 16376: (regression tests)
    
    This patch introduces a regression test for exception_holidays. This routine
    returns a list of datetimes to be used in date comparison and some datetimes don't exist
    in some timezones, so floating timezones should be used instead.
    
    To test:
    - Apply the patch on master
    - Run:
      $ prove t/db_dependent/Holidays.t
    => FAIL: The new test fails
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-----------------------------------------------------------------------

Summary of changes:
 Koha/Calendar.pm          |    6 ++++--
 t/db_dependent/Holidays.t |   50 +++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 50 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list