Fix setTime infinite loop on Firefox (Thanks neoteknic)