title: Timer every hour but starting from 1 minute
body: <p>I would like to create a countdown timer for my resource. An example for this I took from <a href="https://stackoverflow.com/users/3741589/quasimodos-clone">Quasimodo's clone</a> answer of <a href="https://stackoverflow.com/questions/37179899/countdown-timer-every-hour-but-on-30-minute-marks">this page</a>.</p>
  <p>From the code, I took some elements, since I only need minutes and seconds. And I don't need a 30 minute mark.</p>
  <p>The code works great, but unlike the author of the question, I need the start to start and end at 1 minute of the next hour.</p>
  <p>The changes that I made did not lead to the desired result:</p>
  <pre><code>secsRemaining = 3600 - (time.getUTCMinutes()+1)%60 * 60 - time.getUTCSeconds(),
  </code></pre>
  <p>and</p>
  <pre><code>mins = (Math.floor(secsRemaining / 60)+60),
  </code></pre>
  <p>This gave a result, but not the one that is needed. When the time on the clock becomes 00 minutes, then the code becomes 60 minutes and 00+ seconds. I need, for example, at 14:00:59 the timer has the values ​​00:01, and when 14:01:01 the timer has the values ​​59:59.</p>
  <p>Please let me know how it can be changed to achieve the desired result. Perhaps you have a link to solutions. I couldn't find it on the Internet.</p>
  <p>Code I am using:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var byId = document.getElementById.bind(document);
  
  function updateTime() {
    var time = new Date(),
      secsRemaining = 3600 - (time.getUTCMinutes()) % 60 * 60 - time.getUTCSeconds(),
      mins = (Math.floor(secsRemaining / 60)),
      secs = secsRemaining % 60;
    byId('min-part').textContent = mins;
    byId('sec-part').textContent = secs;
    setTimeout(updateTime, 1000 - (new Date()).getUTCMilliseconds()).toLocaleString();
  }
  updateTime();</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;Time left before update: &lt;span id="min-part"&gt;&lt;/span&gt;:&lt;span id="sec-part"&gt;&lt;/span&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>