title: How do I round time to the nearest quarter hour using moment
body: <p>I'm trying to create an array of hours in a day with 15 minute intervals with moment to getting weather satellite image in utc time .</p>
  
  <p>Example: <code>["2019_10_09_17_00", "2019_10_09_17_15", "2019_10_09_17_30"]</code></p>
  
  <p>The problem is the minutes are not fit <code>["2019_10_09_17_09", "2019_10_09_17_24", "2019_10_09_17_39"]</code> </p>
  
  <p>l want to get minutes in fit <code>1700</code> not like <code>1709</code> or <code>1714</code> , because weather satellite image will not load if minutes are not fit ! . </p>
  
  <p>Code </p>
  
  <pre><code> // YYYY_M_DD_hh_mm
  
      const now = moment();
  
      const timeStops = [];
  
      for (let i = 0; i &lt; 3; i++) {
        now.add(15, 'minutes');
        timeStops.push(now.utcOffset(-1).format('YYYY_M_DD_HH_mm'));
      }
  
      console.log(timeStops);
  </code></pre>
  
  <p>Any idea please ?</p>