Is the issue with the second approach just that your timezone is already nonzero, so what you need is just:
var timezone = 1;
var currentTimezone = (new Date()).getTimezoneOffset();
var d = new Date(Date.now()+(timezone-currentTimezone)*3600000);
print(new Date(), d)
© Espruino, powered by microcosm.
Report a problem