我得到电话默认时间并尝试将其转换为科伦坡时间这是我的代码
Calendar c = Calendar.getInstance();
SimpleDateFormat currFormat = new SimpleDateFormat(
"EEE MMM dd HH:mm:ss zzz yyyy");
currFormat.setTimeZone(TimeZone.getTimeZone("Asia/Colombo"));
try {
c.setTime(currFormat.parse(c.getTime().toString()));
} catch (ParseException e1) {
// TODO Auto-generated catch block
Log.e("Time In Srvice", e1.getMessage());
e1.printStackTrace();
}
代码工作正常,但时间未转换为科伦坡时区