title: Converting time to another timezone JS
body: <p>I'm obtaining <code>data.value</code> which is a time in the format: <code>hh:mm a</code> - for example <code>12:30 am</code>.</p>
  <p>I also know:</p>
  <ol>
  <li>the local timezone of the user (<code>userTimeZone</code>)</li>
  <li>the timezone of the venue (<code>venueTimeZone</code>)</li>
  </ol>
  <p>I need to convert the time selected by the user (<code>data.value</code>) to the correct date in the <code>venueTimeZone</code>. For example, if the user is in <code>Americas/New York</code> and they selected 1:30PM on the 20/05/2022, and the venue is in <code>Americas/Los Angeles</code> - the value I am interested in obtaining is <code>20/05/2022 10:30AM</code>.</p>
  <p>This is my attempt, however the timezone itself doesn't change - I think this is because when I create the <code>userDateTime</code> with <code>moment</code> I don't specify a time offset, but I'm not sure how to obtain the offset from <code>userTimeZone</code>, whilst accounting for DST.</p>
  <pre><code>            const userTimeZone = _.get(
                  Intl.DateTimeFormat().resolvedOptions(),
                  ['timeZone']
              );
  
              const venueDateStr = new Date().toLocaleString('en-US', {
                  timeZone: venueTimeZone,
              });
  
              const Date = new Date(restaurantDateStr);
              const venueYear = venueDate.getFullYear();
              const venueMonth = `0${venueDate.getMonth() + 1}`.slice(-2);
              const venueDateOfMonth = `0${venueDate.getDate()}`.slice(-2);
  
              const userDateTime = createDateAsUTC(
                  moment(
                      `${venueDateOfMonth}/${venueMonth}/${venueYear} ${data.value}`,
                      'DD/MM/YYYY hh:mm a'
                  ).toDate()
              ).toLocaleString('en-US', { timeZone: venueTimeZone });
  </code></pre>
  <p>EDIT - I do not have the city offset, I have the timezone name, therefore I cannot use any suggested answer which relies on city offset.</p>