Bug 24850: Date only are not RFC3339

We removed the fallback on 'Bug 24850: Don't fallback when date_format
is passed', and the dates passed for date only (YYYY-MM-DD) are not
RFC3339 formatted but ISO8601.
We must assume that all dates will be YYYY-MM-DD, without fallback.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-11-03 10:06:35 +01:00
parent 9c718e18da
commit 9d1ad49ec9

View file

@ -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, 'iso'))
if defined $value;
}
else {