title: Moment.js set the base time from the server
body: <p>I have been reading the documentation, and cannot seem to find a method to set the date from the server as opposed to the client?</p>
  <p>For example something like this</p>
  <pre><code>moment().set('server time')
  </code></pre>
  <p>Then <strong>moment()</strong> would return the Date Object based on server's time as opposed to the time from the client's computer.</p>
  <p>Does this functionality exist, and if not what are some recommended methods you would use? Right now I am polling the server to get the server's time, but as you can imagine this is not very efficient.</p>
  <h2>UPDATED WITH CODE EXAMPLE AND SUMMARY</h2>
  <p>I am building an auction application. So server time is critical. For example if the user has tampered with their time settings or their time has been manually configured, the client might see an auction that has already ended, when in fact it still has a few minutes left. All time checks are obviously done on the server, but that is why  I need the client and server to be in sync. Now you can see I am polling the server to get the latest time every few seconds. However what I need is to set moment() to call the base time from the variable I pass from the server. So everytime I call moment() it bases the time from the time passed in initially instead of new Date().</p>
  <pre><code>app.getTime = -&gt;
      setInterval -&gt;
          $.get app.apiUrl + 'public/time', (time)  -&gt; 
              app.now = moment(time).format('YYYY-MM-DDTHH:mm')
      , app.fetchTimeInterval
  </code></pre>
  <p>Somewhere else in my application I use the app's server time like so</p>
  <pre><code>collection = new Auction.DealershipBasket [], query: &quot;?$orderby=Ends&amp;$filter=Ends lt datetime'#{app.now}'&quot;
  </code></pre>
  <p>Instead I would like to call the following and it returns the time from server which I only need to configure once with a get request from the url above.</p>
  <pre><code> now = moment().format('YYYY-MM-DDTHH:mm')
  </code></pre>