Browse Source

import.pl: fix date format

master
Fabian Kurz 2 years ago
parent
commit
854a60815a
  1. 4
      db/import.pl

4
db/import.pl

@ -30,9 +30,9 @@ while (my $line = <>) {
}
# in 1-Jun-2019 out -> 20190601
# in 1-Jun-19 out -> 20190601
sub dateformat {
my %months = ( "Jan" => "01", "Feb" => "02", "Mar" => "03", "Apr" => "04", "May" => "05", "Jun" => "06", "Jul" => "07", "Aug" => "08", "Sep" => "09", "Oct" => "10", "Nov" => "11", "Dec" => "12" );
my @d = split(/-/, shift);
return sprintf("%s%s%02d", $d[2], $months{$d[1]}, $d[0]);
return sprintf("20%s%s%02d", $d[2], $months{$d[1]}, $d[0]);
}

Loading…
Cancel
Save