You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Well, you can set time with the Web IDE - in fact that tutorial says:

    First step is to go into the Web IDE's settings (top right icon), then click Communications, then scroll down and make sure that Set Current Time is checked. Then the next time you send code to the Espruino board, the Web IDE will automatically set up its RTC.

    But also simply using the setTime command from the console works too (seconds since 1970 as a number) - it's what the Web IDE does behind the scenes.

    The main thing you need to get the time is getTime(), which returns seconds since 1970 (or by default in the original Espruino board, seconds since startup).

    Then you can initialise the Date class if you need to get more specific information about the time.

About

Avatar for Gordon @Gordon started