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

(-)a/Koha/Patron.pm (-1 / +4 lines)
Lines 1315-1320 sub get_age { Link Here
1315
    my $date_of_birth = dt_from_string( $self->dateofbirth );
1315
    my $date_of_birth = dt_from_string( $self->dateofbirth );
1316
    my $today         = dt_from_string->truncate( to => 'day' );
1316
    my $today         = dt_from_string->truncate( to => 'day' );
1317
1317
1318
    #Set timezone to floating to avoid any datetime math issues caused by DST
1319
    $date_of_birth->set_time_zone('floating') unless $date_of_birth->time_zone->is_floating;
1320
    $today->set_time_zone('floating') unless $today->time_zone->is_floating;
1321
1318
    return $today->subtract_datetime( $date_of_birth )->years;
1322
    return $today->subtract_datetime( $date_of_birth )->years;
1319
}
1323
}
1320
1324
1321
- 

Return to bug 32232