]> 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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Mon, 15 May 2023 10:01:48 +0000 (10:01 +0000)
commitbeaf8076cf3a801cd680f794fee65c9e58f950df
tree281991d43f89ec43634b7e2d04fef133eb4f24c6
parent2f156c15dc711d395a9b2b1c5268fd563e14c2bf
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>
Koha/Patron.pm