title: Format datetime with moment.js to show timezone
body: <p>I have problem showing timezone with moment.js.</p>
  
  <p>I tried with this code: </p>
  
  <pre><code>var result = moment(someDate).format("MM/DD/YYYY HH:mm A Z");
  </code></pre>
  
  <p>and I get return, for example: <code>08/05/2015 06:18 PM +02:00</code>, which is fine, but I want that my output be like <code>08/05/2015 06:18 PM WEDT</code> or something like that, with abbreviations of timezones.</p>
  
  <p>Tried using this code, but I get empty timezone on the end:</p>
  
  <pre><code>var result = moment(someDate).format("MM/DD/YYYY HH:mm A z"); 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var result = moment(someDate).format("MM/DD/YYYY HH:mm A zz");
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>So as @Matt Johnson suggested, I used this approach to show time zone using <a href="http://momentjs.com/downloads/moment-timezone-with-data.js" rel="nofollow">moment-timezone-with-data.js</a> and <a href="https://github.com/Canop/tzdetect.js" rel="nofollow">tzdetect.js</a>:</p>
  
  <pre><code>var tzName = tzdetect.matches()[0];
  var result = moment.tz(myDate, tzName).format("MM/DD/YYYY h:mm A zz");
  </code></pre>