code: public static String getUTCNow()
    {
      SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
      dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT"));
  
      //Time in GMT
      return dateFormatGmt.format(new Date());
    }
docs: Get current time in UTC in the following format
  
  @return String representation in this format: yyyy-MM-dd HH:mm:ss