code: private static String getDateTimeString(long time) {
          int[] fields = Grego.timeToFields(time, null);
          StringBuilder sb = new StringBuilder(15);
          sb.append(numToString(fields[0], 4));
          sb.append(numToString(fields[1] + 1, 2));
          sb.append(numToString(fields[2], 2));
          sb.append('T');
  
          int t = fields[5];
          int hour = t / Grego.MILLIS_PER_HOUR;
          t %= Grego.MILLIS_PER_HOUR;
          int min = t / Grego.MILLIS_PER_MINUTE;
          t %= Grego.MILLIS_PER_MINUTE;
          int sec = t / Grego.MILLIS_PER_SECOND;
          
          sb.append(numToString(hour, 2));
          sb.append(numToString(min, 2));
          sb.append(numToString(sec, 2));
          return sb.toString();
      }
docs: /*
  Convert date/time to RFC2445 Date-Time form #1 DATE WITH LOCAL TIME