1
我需要格式化日期和時間爲2012年11月15日18:55 GMT。Android當前日期和時間
時間應該是在格林尼治標準時間24小時,並有format.I使用下面的代碼嘗試,但它給出了12小時format.Is有什麼辦法的時間?
DateFormat currentDateTimeString = DateFormat.getDateTimeInstance();
currentDateTimeString.setTimeZone(TimeZone.getTimeZone("gmt"));
gmtTime = currentDateTimeString.format(new Date());