]> git.koha-community.org Git - koha.git/commit
Bug 13242: Add a UT to t/DateUtils.t for testing DateTime bug
authorFrédéric Demians <f.demians@tamil.fr>
Sat, 15 Nov 2014 12:20:31 +0000 (13:20 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 19 Nov 2014 14:32:32 +0000 (11:32 -0300)
commite2a169dc9d0f233f680e03fff2002d0d7346ae43
treeef18c052b38fa9ae2f99a09f76217f8a20606792
parent0a41d247b57abe4a4eac25b40516653c3453bc6f
Bug 13242: Add a UT to t/DateUtils.t for testing DateTime bug

A bug in DateTime slow down drastically date parsing when the dates are in the
far distant future:

https://metacpan.org/pod/DateTime#Determining-the-Local-Time-Zone-Can-Be-Slow

This UT tests this situation which affects Koha::DateUtils function
dt_from_string() and output_pref().

TO TEST:
- Apply the patch containing the UT
- prove -v t/DateUtils.t
- You see that parsing a 9999-01-01 that take forever (ie more than 1s)
- Apply the patch containing the fix
- prove -v t/DateUtils.t
- No more complain.

Followed test plan. Test behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described - check-ins are now much faster.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
t/DateUtils.t