Check Out error: Can't change status to an earlier date

Issue #15 resolved
Hans van der Weij created an issue

Check Out is impossible for a copy when the barcode recently has been checked out and checked in.

Steps to replicate: a) Bibliography Check Out: [barcode] b) Check In: [barcode] (and after that Check in all items) c) Bibliography Check Out: [barcode] Error: Can't change status to an earlier date on item [barcode].

This even happens with: Step a) and b) on OpenBiblio 0.6.0 Step c) on OpenBiblio 0.7.0, different database => error identical to above.

Problem appears with:

Uniform Server 5.6.9-Nano Apache 2.2.16 MySQL 5.1.49 * PHP 5.3.3

Some older versions of Uniform Server don't give this error, instead you get bug #14 preg_match error.

The only workaround I could find was waiting a day before checking out again, everything else (log out OpenBiblio, restart server, etc.) failed.

Comments (6)

  1. Hans van der Weij reporter

    Later I saw that time for status changes of Bibliography Copies was an hour earlier than system time.

    PHP.INI from Uniform Server 5.6.9-Nano was responsible (older versions didn't do this):

    date.timezone = "Europe/London"

    I'm in a different timezone. The issue disappeared by commenting out this line, or changing to a value that corresponds to the system configuration.

    I don't know if it's a problem for anyone that OpenBiblio's time should be equal to the system time.

  2. Hans van der Weij reporter

    PHP.INI doesn't state that

    date.timezone =

    is a required setting and shouldn't be commented out.

    When display_errors = On, PHP warnings say "It is not safe to rely on the system's timezone settings"

    For OpenBiblio circulation, the setting in PHP has to match the system configuration. This can be set in PHP.INI, or forced by openbiblio/shared/common.php: date_default_timezone_set('timezone');

  3. Hans van der Weij reporter
    • changed milestone to 0.7
    • Check in all items and Cataloging use BiblioCopyQuery (MySQL sysdate)
    • Check Out and Check In previously used BiblioCopyQuery, in 0.7 this is changed in CircQuery (PHP date)

    Indeed this is not an issue when timezone configuration is correct, but for someone using a recent version of XAMPP (or similar) it might be better that the installer gives a warning.


  4. Log in to comment