From 07aa0a562b35faaa8d04b479c33cec032ece6464 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Wed, 12 Feb 2020 16:04:07 +0000 Subject: [PATCH] Bug 24643: Support fractional seconds This patch allows dt_from_string to handle RFC3339 strings containing fractional seconds up to one thousandth of a second. Test plan: - Apply patch - prove t/DateUtils.t Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- Koha/DateUtils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/DateUtils.pm b/Koha/DateUtils.pm index 459a5a89d7..ef89e306cb 100644 --- a/Koha/DateUtils.pm +++ b/Koha/DateUtils.pm @@ -117,7 +117,7 @@ sub dt_from_string { (?\d{2}) : (?\d{2}) - (([Zz])|([\+|\-]([01][0-9]|2[0-3]):[0-5][0-9])) + (\.\d{1,3})?(([Zz])|([\+|\-]([01][0-9]|2[0-3]):[0-5][0-9])) /xms; } elsif ( $date_format eq 'iso' or $date_format eq 'sql' ) { -- 2.39.5