code: public static String getDatetime() {
          long currentTimeMillis = System.currentTimeMillis();
          final Date date = new Date(currentTimeMillis);
          // ISO-8061 for YAMLish diagnostic
          return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(date);
      }
docs: Get a date time string
  
  @return date time string