https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20750
Andrew Isherwood <andrew.isherw...@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84266|0 |1 is obsolete| | --- Comment #61 from Andrew Isherwood <andrew.isherw...@ptfs-europe.com> --- Created attachment 84977 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84977&action=edit Bug 20750: (follow-up) Remove Time::Piece dep The sorting of log entries was being achieved using Time::Piece::epoch to derive the epoch date from the log timestamps. Time::Piece is not used anywhere else, therefore it was desirable to find an alternative method that uses a library that is already in use in Koha. It would have been possible to use Koha::DateUtils::dt_from_string to do this, however, this function instantiates a DateTime object to do the conversion. DateTime objects are notoriously slow at instantiating, so for this use case where we're potentially converting a lot, it didn't seem ideal. Besides, dt_from_string is built to convert from a variety of formats, but since our timestamps are in a defined format, this seems overkill. In the end, we're using Time::Local::timelocal to obtain the epoch time. Time::Local is in use elsewhere and doesn't depend on DateTime. Also updated the unit test of get_request_logs, it was using the wrong date format anyway! -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/