-
• #2
Have a look in the console log of the ide...
I'm seeing some stangeness too:
Save on send transformed code to: E.setBootCode("setTime(1521267139.472);E.setTimeZone(-780)\nModules.addCached
The set TimeZone looks odd!
-
• #3
Thanks for letting me know!
Looks like there's a unit mismatch - the timezone should be in hours, but the function that was used to get it in the web browser returned minutes. I've fixed this now but it won't be available until I do a new IDE release.
In the mean time, adding
E.setTimeZone(your_timezone)
right at the top of your code should fix it. -
• #4
Also - should the time zone and time get set for the save on send option? The next time the board resets and loads the code the time will be in the past - set to the time when the code was uploaded?
-
• #5
should the time zone and time get set for the save on send option?
I think that is something that's also been improved in the most recent IDE builds - so the time only gets set at upload time (and doesn't get pushed into the 'save on send' stuff).
Im using the Espruino web ide windows 10 download. Im trying to set the time on my puck using the "When sending code, set Espruino's clock to the current time" but its way off. The current time is 3/17 12:40 on my computer, the updated time to the puck says 3/30 5:40. So not only is it the wrong time zone, its two weeks ahead. This is my test code:
Any ideas on how I could fix this would be appreciated.