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

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

Return to bug 23893