the bug may be in other codes
To update moment date, a setTimeout is done. So it is done only once. Should be setInterval