title: Date and time to UTC given timezone
body: <p>i have the following string: 2019120610000100 which corresponds to 2019/12/06 at 10:00 +1.
  How can I convert this to utc time, in this case 2019/12/06 09:00?</p>
  
  <p>This string could also have a +2, +3 ... -1, -2 ... timezone so I must be able to convert other strings too.</p>
  
  <p>The + or - sign is given in another instance however, if it can be useful, it can be added to the time and date string.
  (The string could become 201912061000 +0100)</p>
  
  <p>Right now I'm converting it manually splitting the string but I'm trying to find a way to make this safe as it gets tricky with hours and minutes like 00 that have to change the day, possibly the month and year.
  This is what I have made so far:</p>
  
  <pre><code>hour -= hourOffset;
  if(hour&lt;0){
      hour += 24
  }
  minutes -= minutesOffset;
  if(minutes&lt;0){
      minutes += 60
  }
  </code></pre>