]> git.koha-community.org Git - koha.git/commit
Bug 32232: Ignore DST when calculating patron age
authorDavid Cook <dcook@prosentient.com.au>
Mon, 17 Apr 2023 00:34:05 +0000 (00:34 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 9 May 2023 13:57:59 +0000 (10:57 -0300)
commit5771e6f463c72e17d42478c9970df1c7fb2286f8
treea4430e1b6d618fa6df7fd414cd16e1fc62d063cf
parentb1f623218a3c4ebcde2a7d8ababfa3b507b833e7
Bug 32232: Ignore DST when calculating patron age

This change calculates patron age using the floating timezone, so that
datetimes missing midnight don't cause fatal errors in the comparison.

Test plan:
0. Apply patch
1. Change <timezone></timezone> in koha-conf.xml to include Canada/Eastern
2. koha-plack --restart kohadev
3. Create a patron, setting the date of birth to one of these three dates
- 1947-04-27
- 1948-04-25
- 1949-04-24
4. Save the patron
5. Patron detail page loads instead of producing fatal error

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Patron.pm