From 5d0fd055343b661462e21ff5b452549d3af28fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Tue, 23 Mar 2021 23:08:31 +0100 Subject: [PATCH] Fixed improperly handled case for 'format_timezone_hours' when hours parameter to be formatted is '0' --- lib/ProxySQL_Admin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ProxySQL_Admin.cpp b/lib/ProxySQL_Admin.cpp index 6e9d73720..7c55b6bbf 100644 --- a/lib/ProxySQL_Admin.cpp +++ b/lib/ProxySQL_Admin.cpp @@ -3456,7 +3456,7 @@ const std::string format_timezone_hours(const int num) { const std::string base_num = std::to_string(num); - if (num < 10 && num > 0) { + if (num < 10 && num >= 0) { result = "0" + base_num; } else if (num > -10 && num < 0) { result = base_num.substr(0, 1) + "0" + base_num.substr(1);