X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=application%2FUtils.php;h=c5cd884b7291ba328336837430d4579f12ec2b0e;hb=dafd3f081ab581e074f3280d4323dc92cb33df46;hp=4c2d670133f84b002a8b15c0c8c47815b4a23860;hpb=53054b2bf6a919fd4ff9b44b6ad1986f21f488b6;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Utils.php b/application/Utils.php index 4c2d6701..c5cd884b 100644 --- a/application/Utils.php +++ b/application/Utils.php @@ -323,6 +323,7 @@ function format_date($date, $time = true, $intl = true) IntlDateFormatter::LONG, $time ? IntlDateFormatter::LONG : IntlDateFormatter::NONE ); + $formatter->setTimeZone($date->getTimezone()); return $formatter->format($date); } @@ -382,8 +383,10 @@ function return_bytes($val) switch ($last) { case 'g': $val *= 1024; + // do no break in order 1024^2 for each unit case 'm': $val *= 1024; + // do no break in order 1024^2 for each unit case 'k': $val *= 1024; }