View | Details | Raw Unified | Return to bug 9031
Collapse All | Expand All

(-)a/Koha/Calendar.pm (-3 / +2 lines)
Lines 311-317 sub days_between { Link Here
311
311
312
    # start and end should not be closed days
312
    # start and end should not be closed days
313
    my $days = $start_dt->delta_days($end_dt)->delta_days;
313
    my $days = $start_dt->delta_days($end_dt)->delta_days;
314
    for (my $dt = $start_dt->clone();
314
    for (my $dt = $start_dt->clone()->set_time_zone('UTC');
315
        $dt <= $end_dt;
315
        $dt <= $end_dt;
316
        $dt->add(days => 1)
316
        $dt->add(days => 1)
317
    ) {
317
    ) {
Lines 335-341 sub hours_between { Link Here
335
    # take into account open/close times then it would be a duration
335
    # take into account open/close times then it would be a duration
336
    # of library open hours
336
    # of library open hours
337
    my $skipped_days = 0;
337
    my $skipped_days = 0;
338
    for (my $dt = $start_dt->clone();
338
    for (my $dt = $start_dt->clone()->set_time_zone('UTC');
339
        $dt <= $end_dt;
339
        $dt <= $end_dt;
340
        $dt->add(days => 1)
340
        $dt->add(days => 1)
341
    ) {
341
    ) {
342
- 

Return to bug 9031