尝试为Android构建我的应用程序,但失败(ios构建很好)。似乎正在寻找JAva 1.8,但我有11个处于活动状态。如何删除或禁用11或只是重置整个构建系统以使其正常工作?
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss Z");
OffsetDateTime offsetDateTime = OffsetDateTime.parse("2018-12-24 12:00:00 +0800", formatter);
offsetDateTime = offsetDateTime.minusHours(12);
ZonedDateTime dateTimeInDesiredZoned = offsetDateTime.atZoneSameInstant(ZoneId.of("UTC"));
// 2018-12-23 16:00:00 +0000
System.out.println(formatter.format(dateTimeInDesiredZoned));