title: How to correctly handle "/Date(...-0700)/" date format from Bing using Moment?
body: <p>I'm using the <a href="https://msdn.microsoft.com/en-us/library/ff701717.aspx?f=255&amp;MSPPError=-2147217396#Examples" rel="nofollow noreferrer">Bing Routes API</a>, and it's returning dates in this kind of format:</p>
  
  <pre><code>/Date(1538245980000-0700)/
  </code></pre>
  
  <p>It looks like Unix timestamp in milliseconds, followed by a timezone. The Moment docs <a href="https://momentjs.com/docs/#/parsing/asp-net-json-date/" rel="nofollow noreferrer">claim to be able to handle these correctly</a>, but they also <a href="https://momentjs.com/docs/#/parsing/asp-net-json-date/" rel="nofollow noreferrer">say that</a></p>
  
  <blockquote>
    <p>Unix timestamps and Date objects refer to specific points in time, thus it doesn't make sense to use the time zone offset when constructing.</p>
  </blockquote>
  
  <p>Based on other context (it's the time a bus leaves Stawell, a few hours from Melbourne, on Saturday morning), I'm pretty sure that the above time should be 11:33AM in Australia/Melbourne AEST (+10:00).</p>
  
  <p>But using moment.timezone:</p>
  
  <pre><code>console.log(moment.parseZone('/Date(1538245980000-0700)/').format('h:mma Z'));
  
  "11:33am -07:00"
  </code></pre>
  
  <p>That seems really wrong: this is referring to a moment in time which is:</p>
  
  <ul>
  <li>11:33 AM Pacific Time, </li>
  <li>6:33 PM UTC</li>
  <li>4:33 AM Melbourne time</li>
  </ul>
  
  <p>Is Bing wrong? Why is this timezone included?</p>
  
  <p>Or am I using Moment wrong? In which case, what is the correct way to convert this format into the correct time with my local timezone?</p>