From b0f7773260212cc6c5329abe9d7adc8d351f46dc Mon Sep 17 00:00:00 2001
From: rbelinsky <rbelinsky@dalet.com>
Date: Tue, 19 May 2015 19:11:53 +0300
Subject: [PATCH] lib: Fix sprintf format strings used in Format::seconds()

fixes #9291

Signed-off-by: Eric Lippmann <eric.lippmann@netways.de>
---
 library/Icinga/Util/Format.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/library/Icinga/Util/Format.php b/library/Icinga/Util/Format.php
index 62ef53d1e..ba536e443 100644
--- a/library/Icinga/Util/Format.php
+++ b/library/Icinga/Util/Format.php
@@ -59,13 +59,13 @@ class Format
         if ($value < 60) {
             return self::formatForUnits($value, self::$secondPrefix, self::$secondBase);
         } elseif ($value < 3600) {
-            return sprintf('0.2f m', $value / 60);
+            return sprintf('%0.2f m', $value / 60);
         } elseif ($value < 86400) {
-            return sprintf('0.2f h', $value / 3600);
+            return sprintf('%0.2f h', $value / 3600);
         }
 
         // TODO: Do we need weeks, months and years?
-        return sprintf('0.2f d', $value / 86400);
+        return sprintf('%0.2f d', $value / 86400);
     }
 
     protected static function formatForUnits($value, & $units, $base)