From b7ab9da74a83ccd71bc3ab7bd6a83d3fbb0b2a75 Mon Sep 17 00:00:00 2001 From: Travis Evans Date: Wed, 7 May 2025 19:39:53 -0500 Subject: [PATCH] Replace deprecated substr() with slice() --- apps/tevtimer/lib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/tevtimer/lib.js b/apps/tevtimer/lib.js index 0f187ca72..c3686cbaa 100644 --- a/apps/tevtimer/lib.js +++ b/apps/tevtimer/lib.js @@ -187,9 +187,9 @@ function format_duration(msec, have_seconds) { } const time = Time_utils.decodeTime(msec); time.h += time.d * 24; - let str = time.h + ":" + ("0" + time.m).substr(-2); + let str = time.h + ":" + ("0" + time.m).slice(-2); if (have_seconds) { - str += ":" + ("0" + time.s).substr(-2); + str += ":" + ("0" + time.s).slice(-2); } return str; }