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

(-)a/Koha/Calendar.pm (-3 / +2 lines)
Lines 327-333 sub days_between { Link Here
327
327
328
    # start and end should not be closed days
328
    # start and end should not be closed days
329
    my $days = $start_dt->delta_days($end_dt)->delta_days;
329
    my $days = $start_dt->delta_days($end_dt)->delta_days;
330
    for (my $dt = $start_dt->clone()->set_time_zone('UTC');
330
    for (my $dt = $start_dt->clone()->set_time_zone('floating');
331
        $dt <= $end_dt;
331
        $dt <= $end_dt;
332
        $dt->add(days => 1)
332
        $dt->add(days => 1)
333
    ) {
333
    ) {
Lines 351-357 sub hours_between { Link Here
351
    # take into account open/close times then it would be a duration
351
    # take into account open/close times then it would be a duration
352
    # of library open hours
352
    # of library open hours
353
    my $skipped_days = 0;
353
    my $skipped_days = 0;
354
    for (my $dt = $start_dt->clone()->set_time_zone('UTC');
354
    for (my $dt = $start_dt->clone()->set_time_zone('floating');
355
        $dt <= $end_dt;
355
        $dt <= $end_dt;
356
        $dt->add(days => 1)
356
        $dt->add(days => 1)
357
    ) {
357
    ) {
358
- 

Return to bug 9031