We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
大神的UTC时间转换太暴力了,可以这样 @Nullable public static String subStandardTime(String time) throws ParseException { SimpleDateFormat formatUTC = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z"); Date date = formatUTC.parse(time.replace("Z", " UTC")); SimpleDateFormat formatGST = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return formatGST.format(date); }
@Nullable
public static String subStandardTime(String time) throws ParseException {
SimpleDateFormat formatUTC = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
Date date = formatUTC.parse(time.replace("Z", " UTC"));
SimpleDateFormat formatGST = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return formatGST.format(date);
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
大神的UTC时间转换太暴力了,可以这样
@Nullable
public static String subStandardTime(String time) throws ParseException {
SimpleDateFormat formatUTC = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
Date date = formatUTC.parse(time.replace("Z", " UTC"));
SimpleDateFormat formatGST = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return formatGST.format(date);
}
The text was updated successfully, but these errors were encountered: