You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • 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-currentTimezonĀ­e)*3600000);
    print(new Date(), d)
    
About

Avatar for Gordon @Gordon started