title: Google Apps Scripts: Set the timezone of Datepicker in
body: <p>Create a date picker:</p>
  <pre><code>var fromDateTimePicker = CardService.newDatePicker()
      .setTitle(&quot;From Day&quot;)
      .setFieldName(&quot;range_start&quot;)
      .setValueInMsSinceEpoch(Date.now())
      .setOnChangeAction(
        CardService.newAction().setFunctionName(&quot;handleRangeStartChange&quot;)
      );
  </code></pre>
  <p>Function called when date picked:</p>
  <pre><code>function handleRangeStartChange(e) {
    let rangeStart = new Date(e.formInput.range_start.msSinceEpoch);
    Logger.log(rangeStart);
  }
  </code></pre>
  <p>Selecting <code>Jun 01 2022</code> in Datepicker, logs <code>May 31 2022</code>. Timezone is off.</p>
  <p><a href="https://developers.google.com/apps-script/add-ons/concepts/event-objects?hl=en" rel="nofollow noreferrer">DOCS</a> mention timezone properties on callback events are deprecated.</p>
  <p><strong>How do you set the timezone of Datepicker?</strong></p>