[Koha-bugs] [Bug 24850] Koha::DateUtils ignores offsets in RFC3339 datetimes
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Nov 2 17:55:22 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24850
--- Comment #110 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
We could assume that 'date' won't be rfc3339, but I am not sure it's correct.
The following patches seem to fix the tests.
diff --git a/Koha/Object.pm b/Koha/Object.pm
index 5d0f3f720ff..ec1316c45d7 100644
--- a/Koha/Object.pm
+++ b/Koha/Object.pm
@@ -751,7 +751,7 @@ sub attributes_from_api {
elsif ( _date_or_datetime_column_type(
$columns_info->{$koha_field_name}->{data_type} ) ) {
try {
if ( $columns_info->{$koha_field_name}->{data_type} eq 'date'
) {
- $value = $dtf->format_date(dt_from_string($value,
'rfc3339'))
+ $value = $dtf->format_date(dt_from_string($value))
if defined $value;
}
else {
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list