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

(-)a/Koha/Patron.pm (-3 / +11 lines)
Lines 1565-1581 sub to_api { Link Here
1565
    return $json_patron;
1565
    return $json_patron;
1566
}
1566
}
1567
1567
1568
=head3 attributes_from_api
1569
1570
    my $attrs = $patron->attributes_from_api( $attrs );
1571
1572
Overloaded method that implement specific data transformations after
1573
calling the original Koha::Object->attributes_from_api method.
1574
1575
=cut
1576
1568
sub attributes_from_api {
1577
sub attributes_from_api {
1569
    my ( $self, $attrs ) = @_;
1578
    my ( $self, $attrs ) = @_;
1570
1579
1571
    $attrs = $self->SUPER::attributes_from_api( $attrs );
1580
    $attrs = $self->SUPER::attributes_from_api( $attrs );
1572
1581
1573
    if ( exists $attrs->{lastseen} ) {
1582
    if ( exists $attrs->{lastseen} ) {
1574
        $attrs->{lastseen} = dt_from_string($attrs->{lastseen});
1583
        $attrs->{lastseen} = dt_from_string($attrs->{lastseen}, 'rfc3339');
1575
    }
1584
    }
1576
1585
1577
    if ( exists $attrs->{updated_on} ) {
1586
    if ( exists $attrs->{updated_on} ) {
1578
        $attrs->{updated_on} = dt_from_string($attrs->{updated_on});
1587
        $attrs->{updated_on} = dt_from_string($attrs->{updated_on}, 'rfc3339');
1579
    }
1588
    }
1580
1589
1581
    return $attrs;
1590
    return $attrs;
1582
- 

Return to bug 23893