title: How to get the start time and end time in utc of a day for a specified timezone in javascript?
body: <p>As the title stated, I want to get the start time and end time of a day for certain timezone and convert them to utc time. Here is my part of my implementation: </p>
  
  <pre><code>//convert current local time to specified timezone time
  var converted = moment.tz(moment(), timezone).format("YYYY-MM-DD");
  var full_format = "YYYY-MM-DD HH:mm:ss";
  
  // get start time and end time in the timezone
  var start = converted + " 00:00:00";
  var end = converted + " 23:59:59";
  
  // how to convert them in utc time by momentjs or other methods? 
  var utc_start_time = ?
  var utc_end_time = ?
  </code></pre>
  
  <p>The question is how to convert the time in certain timezone to utc time. Or is there any other decent solutions to it? Thank you!</p>
  
  <p>Edit:</p>
  
  <p>I figured out a way to make it myself which is not quite decent. </p>
  
  <pre><code>var converted = moment.tz(moment(), timezone).format("YYYY-MM-DD");         
  var full_format = "YYYY-MM-DD HH:mm:ss";
  var start = converted + " 00:00:00";
  var end = converted + " 23:59:59";
  var utc_start_time = moment(start).add(utc_offset * -1, 'hours').format(full_format);
  var utc_end_time = moment(end).add(utc_offset * -1, 'hours').format(full_format); 
  </code></pre>
  
  <p>Any suggestions on improvements are welcome. Thanks</p>