调用api时报错InvalidTimeStamp.Expired如何解决
使用阿里云提供的SDK方法 以下是源码
public static String formatIso8601Date(Date date) { return getIso8601DateFormat().format(date); } private static DateFormat getIso8601DateFormat() { SimpleDateFormat df = new SimpleDateFormat(ISO8601_DATE_FORMAT, Locale.US); df.setTimeZone(new SimpleTimeZone(0, 'GMT')); return df; }
赞0
踩0