Just changed the above - it should be (new Date()).getTimezoneOffset()
(new Date()).getTimezoneOffset()
But honestly I'd just use the second option... It's a bit cleaner IMO.
I have to pull Date 2 times
I'm not sure I understand? Once you have d set up that's all you need - no need to call Date again until the next time you draw.
d
@Gordon started
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.
Just changed the above - it should be
(new Date()).getTimezoneOffset()
But honestly I'd just use the second option... It's a bit cleaner IMO.
I'm not sure I understand? Once you have
d
set up that's all you need - no need to call Date again until the next time you draw.