http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10824
Bug ID: 10824 Summary: OAI-PMH repository/server not handling time in "from" argument Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: dc...@prosentient.com.au QA Contact: testo...@bugs.koha-community.org Currently, if you try to use time in a "from" argument with the Koha OAI-PMH repository/server, you'll get unexpected results. Case 1: There are 3 records with the following timestamps: 2013-09-02 10:29:40 2013-09-05 13:44:33 2013-09-05 13:44:34 However, if you sent a request using "2013-09-02 8:29:40" or "2013-09-02T8:29:40Z" (the latter being the 'proper' way), you'll only retrieve the last 2 records of the 3 record set. This is because we're using this code to check the "from" and "until" arguments: "WHERE DATE(timestamp) >= ? AND DATE(timestamp) <= ?" We need to strip DATE() from around the timestamps. If we just compare the normal timestamp, MySQL can handle properly compare the timestamp against the following strings: "2013-09-02" "2013-09-02 8:29:40" "2013-09-02T8:29:40Z" (NB This one produces a warning (not an error) so it's less than ideal) I'm proposing that we remove DATE() and include a regex to strip UTC designators T and Z. This way, we'll always be passing in "2013-09-02" or "2013-09-02 8:29:40" which work perfectly. -- You are receiving this mail because: You are the assignee for the bug. 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/