In Java we need to convert the string in the appropriate format, and many times we think of using the SimpleDateFormat class to parse it. But recently, when I called a third-party interface, there was a expires field in the JSON string that returned the value of 2014-08-24t09:27:42z. The first reaction must be associated with the time zone. So how do you parse it into a date class?
SimpleDateFormat df = new SimpleDateFormat ("Yyyy-mm-dd ' T ' HH:mm:ss ' Z '");d F.settimezone (Timezone.gettimezone ("UTC")) ; System.out.println (Df.parse ("2014-08-23t09:20:05z"). toString ());
Now look at the printed information you asked for, right? The title of the blog contains the two keywords TZ, mainly for the convenience of others to search, because many people do not know that this is UTC time AH. This next people search TZ may be able to search this blog.
Java Transit UTC time String (contains T Z) for local time