Example of Obtaining the UTC Expiration Time
/**
* Obtain the expiration time in UTC format.
* @param expectedExpiredTime: Transaction expiration time, in minutes.
* @return: UTC time.
*/
private static String getTradeExpireTime(int expectedExpiredTime) {
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
formater.setTimeZone(TimeZone.getTimeZone("UTC"));
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MINUTE, calendar.get(Calendar.MINUTE) + expectedExpiredTime);
return formater.format(calendar.getTime());
}