From 3c398df411de1fec74aee5b55053bed2d4479d07 Mon Sep 17 00:00:00 2001 From: Adam <33525058+Cyber28@users.noreply.github.com> Date: Sun, 6 Oct 2019 11:35:01 +0200 Subject: [PATCH] Fix clock adding a 0 before the time --- src/modules/Clock.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/Clock.jsx b/src/modules/Clock.jsx index c674110d..c27d8ad6 100644 --- a/src/modules/Clock.jsx +++ b/src/modules/Clock.jsx @@ -23,7 +23,7 @@ export default class Clock extends React.Component { if (h > 12) h = h - 12; - if (h < 12) this.setState({ date: '0' + h + ':' + m, ampm: ampm }); + if (h < 12) this.setState({ date: h + ':' + m, ampm: ampm }); else this.setState({ date: h + ':' + m, ampm: ampm }); this.timeout = setTimeout(() => this.startTime(), 500);