我需要的是:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");sdf.setTimeZone(TimeZone.getTimeZone("GMT"));SimpleDateFormat sdfLocal = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");try { String d = sdf.format(new Date()); System.out.println(d); System.out.println(sdfLocal.parse(d));} catch (Exception e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.}输出:有点可疑,但我只希望日期保持一致
2013.08.08 11:01:08Thu Aug 08 11:01:08 GMT+08:00 2013



