fuzzyworld

godot-shooter / commit

Fixed log format, now hour/minute/second components always have 2 digits.

8a97e8453b49f08e0cf9ddbe056dc2633dc6a00f · Pavel Safronov · 2023-12-01 12:12:53 -0800 · parents bfa99fb90543

Fixed log format, now hour/minute/second components always have 2 digits.
 utils/Utils.gd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/Utils.gd b/utils/Utils.gd
index a8bb2e3..f8c04eb 100644
--- a/utils/Utils.gd
+++ b/utils/Utils.gd
@@ -41,7 +41,7 @@ static func log(arg1 = null, arg2 = null, arg3 = null, arg4 = null, arg5 = null,
 		seconds_decimal = 0
 	var seconds_decimal_text = "%.6f" % seconds_decimal
 	seconds_decimal_text = seconds_decimal_text.replace("0.", "")
-	var now_text = "%s:%s:%s.%s" % [now_dict["hour"], now_dict["minute"], now_dict["second"], seconds_decimal_text]
+	var now_text = "%02d:%02d:%02d.%s" % [now_dict["hour"], now_dict["minute"], now_dict["second"], seconds_decimal_text]
 	text += now_text
 	text += "> "
 	for argument in [arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9]: