Did you upload using the right-hand side of the IDE? The clock module needs to be loaded off the net, so it has to be uploaded first via the right-hand side so the IDE can detect its use and upload it.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Did you upload using the right-hand side of the IDE? The
clock
module needs to be loaded off the net, so it has to be uploaded first via the right-hand side so the IDE can detect its use and upload it.However, you may find that the
Date
class does everything that you need all by itself? http://www.espruino.com/Reference#DateYou can turn on
Set Current Time
in the Web IDE so that it will automatically set the correct time whenever you upload code.