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

(-)a/Koha/Illrequest/Logger.pm (-2 / +3 lines)
Lines 19-24 package Koha::Illrequest::Logger; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use JSON qw( to_json from_json );
21
use JSON qw( to_json from_json );
22
use Time::Piece;
22
23
23
use C4::Context;
24
use C4::Context;
24
use C4::Templates;
25
use C4::Templates;
Lines 228-234 sub get_request_logs { Link Here
228
        );
229
        );
229
    }
230
    }
230
231
231
    my @sorted = sort {$$b{'timestamp'} <=> $$a{'timestamp'}} @{$logs};
232
    my $format = '%Y-%m-%d %H:%M:%S';
233
    my @sorted = sort {Time::Piece->strptime($$b{'timestamp'}, $format)->epoch <=> Time::Piece->strptime($$a{'timestamp'}, $format)->epoch} @{$logs};
232
234
233
    return \@sorted;
235
    return \@sorted;
234
}
236
}
235
- 

Return to bug 20750