From d91490874c403e6dc066f8b497e8bd9447d5ebd7 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 2 Jul 2021 21:42:10 +0100 Subject: [PATCH] fix: add that fix for minutes, not just seconds --- src/components/widgets/time/Clock.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/widgets/time/Clock.jsx b/src/components/widgets/time/Clock.jsx index 30aff0fb..314e5fb0 100644 --- a/src/components/widgets/time/Clock.jsx +++ b/src/components/widgets/time/Clock.jsx @@ -49,7 +49,7 @@ export default class Clock extends React.PureComponent { if (localStorage.getItem('timeformat') === 'twentyfourhour') { if (zero === 'false') { - time = `${now.getHours()}:${('00' + now.getMinutes()).slice(-2)}${sec}`; + time = `${now.getHours()}:${('00' + now.getMinutes()).slice(-2)}:${('00' + now.getMinutes()).slice(-2)}`; } else { time = `${('00' + now.getHours()).slice(-2)}:${('00' + now.getMinutes()).slice(-2)}${sec}`; } @@ -66,7 +66,7 @@ export default class Clock extends React.PureComponent { } if (zero === 'false') { - time = `${hours}:${now.getMinutes()}${sec}`; + time = `${hours}:${('00' + now.getMinutes()).slice(-2)}${sec}`; } else { time = `${('00' + hours).slice(-2)}:${('00' + now.getMinutes()).slice(-2)}${sec}`; }