]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 15 Jun 2023 16:36:13 +0000 (16:36 +0000)
commit0b3bc2399dae689a0b550b0f52da397bc9449be7
tree772556072278fae93b566df04c0ef914f74f508b
parent06bf531b3d6d9fdf27499d8a0b1361d798c74193
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>
(cherry picked from commit 5771e6f463c72e17d42478c9970df1c7fb2286f8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit beaf8076cf3a801cd680f794fee65c9e58f950df)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/Patron.pm