Question

getTimezoneOffset return 0 when using Zapier Code

  • 12 March 2023
  • 1 reply
  • 96 views

Hi there,

 

I am wondering why getTimezoneOffset is always returning 0 when I run it in Zapier Code using JS. I have set my timezone properly and yet and I am getting 0 when i run this code

var initialArriveDate = "2023-02-01T15:00:00-07:00";

var arrivDate = new Date(initialArriveDate);

var timeOffsetArrival = arrivDate.getTimezoneOffset();

 

Can you please help


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @mhasni 

Good question.

Code help article: https://help.zapier.com/hc/en-us/articles/8496310939021-Use-JavaScript-code-in-Zaps#6-test-your-code-action-0-5