Bug 28809

Summary: Patron age calculated incorrectly after changing dateformat syspref
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Andrew Fuerste-Henry 2021-08-03 19:34:46 UTC
To recreate:
- change the dateformat syspref (I was on MM/DD/YYYY and changed to YYYY-MM-DD)
- click to edit a patron record
- select yesterday for patron's date of birth
- note the text that appears under DOB to tell you the patron's age is something entirely wrong

This is only an issue with the age as it appears on the edit page. Koha calculates the age correctly on save and correctly enforces category age limits.

Dateformat is getting cached somewhere. I was able to correct it by restarting memcached and plack, but that shouldn't be needed.
Comment 1 Nick Clemens (kidclamp) 2021-08-03 19:36:08 UTC
dateformat_pref is a global variable and does not seem to clear until a restart_all