0
我想以UTC格式轉換我的日期,爲此我必須使用SimpleDateFormat類來解析它。但它給了我無法解析的日期異常。我下面的代碼給出:java.text.ParseException:日期UTC轉換時的無法解析的日期異常
//My date coming from server: Wed Dec 23 13:00:00 GMT+04:00 2015
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MM EE- HH:mm:ss yy");
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
Date myDate = simpleDateFormat.parse(s1.datefrom + "");
什麼是S1? – NAIT
s1是我從中得到我的約會的對象。 –