On Nov 3rd 2019, Brazil will skip from 00:00 to 1:00 (http://www.currenttimeonline.com/dst/dst.do?tz=America/Sao_Paulo), DateTime consider it as an invalid date. It is a problem when we are playing with dates without the time part (always 00:00). When we instantiate a DateTime (from dt_from_string) we are already handling this issue, and use the floating timezone (since bug 12669). The problem remains when we generate a DateTime then add or subtract a duration, which will result in an invalid date: DateTime->new(year => 2019, month => 12, day => 3, time_zone => 'America/Sao_Paulo')->subtract(days => 30); => Nov 3rd 2019, kaboom. We should replace all the problematic occurrences of dt_from_string->subtract (or ->add) with dt_from_string(undef, undef, 'floating'), to use the floating timezone and avoid the error. Actually there are not many of them, I have found only 3 that could produce real problems. The other occurrences are: - in tests => Not a big deal (for now) - called on a datetime, so it will explode if called at midnight 00:00:00 (and nobody should work at that time). Test plan: 0/ Define the timezone to 'America/Sao_Paulo' (in your koha-conf.xml file), restart_all 1/ Set a patron's expiry date to Dec 3rd 2019, and NotifyBorrowerDeparture to 30 (default value) 2/ See the checkouts page for this user => Without this patch you get "Invalid local time for date in time zone: America/Sao_Paulo" => With this patch apply the page displays correctly QA will review the 2 other occurrences. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> |
||
|---|---|---|
| C4 | ||
| Koha | ||
| OpenILS | ||
| acqui | ||
| admin | ||
| api/v1 | ||
| authorities | ||
| basket | ||
| catalogue | ||
| cataloguing | ||
| circ | ||
| clubs | ||
| course_reserves | ||
| debian | ||
| docs | ||
| errors | ||
| etc | ||
| ill | ||
| installer | ||
| koha-tmpl | ||
| labels | ||
| members | ||
| misc | ||
| offline_circ | ||
| opac | ||
| patron_lists | ||
| patroncards | ||
| plugins | ||
| reports | ||
| reserve | ||
| reviews | ||
| rotating_collections | ||
| serials | ||
| services | ||
| skel | ||
| suggestion | ||
| svc | ||
| t | ||
| tags | ||
| tmp/modified_authorities | ||
| tools | ||
| virtualshelves | ||
| xt | ||
| .editorconfig | ||
| .gitignore | ||
| .htaccess | ||
| .mailmap | ||
| .scss-lint.yml | ||
| INSTALL | ||
| Koha.pm | ||
| LICENSE | ||
| MANIFEST.SKIP | ||
| Makefile.PL | ||
| README | ||
| README.md | ||
| README.robots | ||
| about.pl | ||
| changelanguage.pl | ||
| fix-perl-path.PL | ||
| gulpfile.js | ||
| help.pl | ||
| koha_perl_deps.pl | ||
| kohaversion.pl | ||
| mainpage.pl | ||
| package.json | ||
| rewrite-config.PL | ||
| yarn.lock | ||
README.md
Koha is a free software integrated library system (ILS).
Koha is distributed under the GNU GPL version 3 or later.
Note: This is a synced mirror of the official Koha repo.
Note: Koha does not accept pull requests from git hosting sites.
Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.
For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch
The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook
