DateTime dt = new DateTime("2014-09-15T21:20:14");
System.out.println(dt);
System.out.println(dt.plusMillis(581042272).toDateTime().toLocalDateTime().toDateTime(DateTimeZone.forID("GMT")));
dt中的时间是UTC,我想将时间设置为dt加上毫秒到GMT?但是,时间仍然以UTC格式打印(格林威治标准时间后1小时)。我如何设置它,因此它在前面一个小时?在乔达将UTC转换为LocalDateTime?
2014-09-15T21:20:14.000+01:00
2014-09-22T14:44:16.272Z
我知道时间是整整一个小时的背后,因为我提出这个要求在15点44分16秒GMT
你是什么意思“dt中的时间是UTC”?显然,第一行输出并不是这种情况。你的意思是'“2014-09-15T21:20:14”'意思是UTC? – 2014-09-22 15:01:34
是的,抱歉,如果它不清楚乔恩。 – Adz 2014-09-22 15:02:17