title: Add 30 minutes to the current time
body: <p>I have written the code below but if the current date-time is <code>2022-07-03 09:48:05.448</code> and I add <strong>30 minutes</strong>, my response returns <code>2022-07-03 09:79:05.448</code>.</p>
  <p><strong>But minutes can never be 79</strong>, it is supposed to move to the hours instead...</p>
  <pre><code>public static String getExpiryDate(int additionalMinutesToCurrentMinute) {
      LocalDateTime now = LocalDateTime.now();
      int year = now.getYear();
      int month = now.getMonthValue();
      int day = now.getDayOfMonth();
      int hour = now.getHour();
      int minute = now.getMinute() + additionalMinutesToCurrentMinute;
      int second = now.getSecond();
      int millis = now.get(ChronoField.MILLI_OF_SECOND); // Note: no direct getter available.
  
      String expiryDateAndTime = String.format(&quot;%d-%02d-%02d %02d:%02d:%02d.%03d&quot;, year, month, day, hour, minute, second, millis);
      return expiryDateAndTime;
  }
  </code></pre>