Fix clock adding a 0 before the time

This commit is contained in:
Adam 2019-10-06 11:35:01 +02:00 committed by GitHub
parent 27fb91e9a9
commit 3c398df411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);