title: How to convert from GMT/UTC to local time and back using momentjs?
body: <p>I have the following string:</p>
  
  <p>"December 25, 2018 01:02:20"</p>
  
  <p>I intend this to be GMT/UTC Using moment.js, how do I convert this to local time and back to UTC?</p>
  
  <p>When I do:</p>
  
  <pre><code>moment(myDateString).local()
  </code></pre>
  
  <p>Then later to try to convert back:</p>
  
  <pre><code>moment(myDateStrig).utc()
  </code></pre>
  
  <p>They both yield different results. How do I make it so that I can convert the time I have from UTC to local, then back to UTC?</p>
  
  <p>Note:
  When I try the <code>.utc()</code> function on the string <code>"December 25, 2018 01:02:20"</code> I get a different time. When I do a <code>.local()</code> on the utc converted moment, I get a different date that is not my original date of <code>"December 25, 2018 01:02:20"</code>.</p>
  
  <p>Please show an example if you can as I it looks like I have 3 different dates.</p>