Bug 14998: Restore previous behavior
We want to convert a us or metric date formatted to the format defined in the pref. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
79cedd3718
commit
ef0b3869a6
|
|
@ -146,14 +146,14 @@ while (my $accountline = $sth->fetchrow_hashref) {
|
|||
|
||||
if ($mode eq 'us') {
|
||||
if ($description =~ /$US_DATE/) { # mm/dd/yyyy
|
||||
my $date = eval { output_pref( { dt => dt_from_string( $1 ), dateonly => 1, dateformat => 'us' } ); };
|
||||
my $date = output_pref( { dt => dt_from_string( $1, 'us' ), dateonly => 1} );
|
||||
print "Converting $1 (us) to " . $date . "\n" if $DEBUG;i
|
||||
$description =~ s/$US_DATE/$date/;
|
||||
$updated = 1;
|
||||
}
|
||||
} elsif ($mode eq 'metric') {
|
||||
if ($description =~ /$METRIC_DATE/) { # dd/mm/yyyy
|
||||
my $date = eval { output_pref( { dt => dt_from_string( $1 ), dateonly => 1, dateformat => 'metric' } ); };
|
||||
my $date = output_pref( { dt => dt_from_string( $1, 'metric' ), dateonly => 1} );
|
||||
print "Converting $1 (metric) to " . $date . "\n" if $DEBUG;
|
||||
$description =~ s/$METRIC_DATE/$date/;
|
||||
$updated = 2;
|
||||
|
|
|
|||
Loading…
Reference in New Issue