It's not entirely surprising that the minute parameter doesn't respond well to out of range minutes. I'm extremely surprised it works on desktop!
However I've just tweaked Date so new 'cutting edge' - and 2v02+ builds - will have the change in.
To do stuff like alter the hour what I'd suggest is to:
var ms = d.getTime();
d = new Date(ms)
Either that or you could keep changing E.setTimeZone depending on how you want the date to appear, which seems to be basically what you're doing?
I'm actually kind of surprised there's nothing standard in the Date class that allows you to change the timezone on a per-date basis, but it seems not!
© Espruino, powered by microcosm.
Report a problem