diff --git a/Finance/Quote/DKB.pm b/Finance/Quote/DKB.pm index e7c22d3..13eaef6 100644 --- a/Finance/Quote/DKB.pm +++ b/Finance/Quote/DKB.pm @@ -44,8 +44,10 @@ my %wknmap = ( sub methods {return ('dkb' => \&dkb, 'europe' => \&dkb);} -sub labels { return (dkb=>[qw/name date price currency/]); } - +{ +my @labels = ('name', 'date', 'price', 'last', 'currency'); +sub labels { return (dkb => \@labels, europe => \@labels); } +} sub get_stock_url { @@ -93,7 +95,11 @@ sub dkb my $pricestr = $prices[0]->as_text; my @splitvals = ( $pricestr =~ /((\d|,|\.)*)\s*/g); if (@splitvals) { - $info{$stock,'price'} = $splitvals[0]; + my $converted_price = $splitvals[0]; + $converted_price =~ s/\.//g; + $converted_price =~ s/,/./g; + $info{$stock,'price'} = $converted_price; + $info{$stock,'last'} = $converted_price; if ($pricestr =~ /EUR/) { $info{$stock,'currency'} = 'EUR'; } @@ -104,7 +110,7 @@ sub dkb #$info{$stock,'date'} = $dates[0]->as_text; $quoter->store_date(\%info, $stock, {eurodate => $dates[0]->as_text}); }; - #$info{$stock,'last'} = '18.70'; + $info{$stock,'timezone'} = 'Europe/Berlin'; #$info{$stock,'currency'} = 'EUR'; } }