View | Details | Raw Unified | Return to bug 24850
Collapse All | Expand All

(-)a/Koha/DateUtils.pm (-4 / +3 lines)
Lines 117-123 sub dt_from_string { Link Here
117
            (?<minute>\d{2})
117
            (?<minute>\d{2})
118
            :
118
            :
119
            (?<second>\d{2})
119
            (?<second>\d{2})
120
            (\.\d{1,3})?(([Zz])|((?<offset>[\+|\-])(?<hours>[01][0-9]|2[0-3]):(?<minutes>[0-5][0-9])))
120
            (\.\d{1,3})?(([Zz]$)|((?<offset>[\+|\-])(?<hours>[01][0-9]|2[0-3]):(?<minutes>[0-5][0-9])))
121
        /xms;
121
        /xms;
122
    }
122
    }
123
    elsif ( $date_format eq 'iso' or $date_format eq 'sql' ) {
123
    elsif ( $date_format eq 'iso' or $date_format eq 'sql' ) {
Lines 141-147 sub dt_from_string { Link Here
141
                )?
141
                )?
142
            )?
142
            )?
143
    |xms;
143
    |xms;
144
    $regex .= $time_re;
144
    $regex .= $time_re unless ( $date_format eq 'rfc3339' );
145
    $fallback_re .= $time_re;
145
    $fallback_re .= $time_re;
146
146
147
    my %dt_params;
147
    my %dt_params;
Lines 157-163 sub dt_from_string { Link Here
157
        if ( $+{offset} ) {
157
        if ( $+{offset} ) {
158
            $tz = DateTime::TimeZone->new( name => $+{offset} . $+{hours} . $+{minutes} );
158
            $tz = DateTime::TimeZone->new( name => $+{offset} . $+{hours} . $+{minutes} );
159
        }
159
        }
160
    } elsif ( $date_string =~ $fallback_re ) {
160
    } elsif ( ($date_format ne 'rfc3339') && ($date_string =~ $fallback_re) ) {
161
        %dt_params = (
161
        %dt_params = (
162
            year   => $+{year},
162
            year   => $+{year},
163
            month  => $+{month},
163
            month  => $+{month},
164
- 

Return to bug 24850