title: Convert a Date to specified format moment.js
body: <p>I have a date stored in variable like below</p>
  <pre><code>var date = moment(new Date()).valueOf();
  </code></pre>
  <p>I need to format it like below</p>
  <blockquote>
  <p>CCYY-MM-DDThh:mm:ss[.sss]TZD</p>
  <p>The Time Zone Definition is mandatory and MUST be either UTC (denoted by addition of the character 'Z' to the end of the string) or some offset from UTC (denoted by addition of '[+|-]' and 'hh:mm' to the end of the string).</p>
  </blockquote>
  <p>I have tried like below</p>
  <pre><code>var required = moment.utc(date).format('CCYY-MM-DDThh:mm:ss[.sss]TZD')
  </code></pre>
  <p>But it is resulting like below</p>
  <pre><code>&quot;CC14-06-03T07:59:15.sssT+00:003&quot;
  </code></pre>
  <p>But the expected format examples are</p>
  <pre><code>UTC : 
  
  1969-07-21T02:56:15Z
  
  Houston time :
  
  1969-07-20T21:56:15-05:00
  </code></pre>