diff options
author | filip <filip.komar@gmail.com> | 2015-03-12 17:25:17 +0100 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2015-03-12 17:25:17 +0100 |
commit | 9fa962b34585726f63f1e9271dd888dbd5b17460 (patch) | |
tree | 1856ac49b21b8513f423314aea7d918d70a3e5f6 /en | |
parent | 144def1ef5a5de5e82eee89fbfa5d9d6f58869ce (diff) | |
download | www-9fa962b34585726f63f1e9271dd888dbd5b17460.tar www-9fa962b34585726f63f1e9271dd888dbd5b17460.tar.gz www-9fa962b34585726f63f1e9271dd888dbd5b17460.tar.bz2 www-9fa962b34585726f63f1e9271dd888dbd5b17460.tar.xz www-9fa962b34585726f63f1e9271dd888dbd5b17460.zip |
take into correct numbers with comma instead of a dot + fix a timezone warning
Diffstat (limited to 'en')
-rw-r--r-- | en/about/reports/template.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/en/about/reports/template.php b/en/about/reports/template.php index 2cd6e6aeb..31c596626 100644 --- a/en/about/reports/template.php +++ b/en/about/reports/template.php @@ -11,7 +11,7 @@ $_months = array( 7 => 'July', 8 => 'August', 9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December' ); - +date_default_timezone_set(@date_default_timezone_get()); /** * Format numbers after ISO_31 recommandation, * using the comma as decimal sep. @@ -24,7 +24,9 @@ $_months = array( */ function _report_number_format($n, $dec_sep = ',') { - return str_replace('#', ' ', number_format($n, 2, $dec_sep, '#')); + $n = str_replace(',', '.', $n); + $num = number_format($n, 2, $dec_sep, '#'); + return str_replace('#', ' ', $num); } $data = file($source_csv); |