static LocalDateTime calculateArrivalAtNY(LocalDateTime bj, int h, int m) {
return bj.atZone(ZoneId.of("Asia/Shanghai")).withZoneSameInstant(ZoneId.of("America/New_York")).plusHours(h).plusMinutes(m).toLocalDateTime();
}
在IDEA也可以这样写
static LocalDateTime calculateArrivalAtNY(LocalDateTime bj, int h, int m) {
return bj.atZone(ZoneId.systemDefault()).withZoneSameInstant(ZoneId.of("America/New_York")).plusHours(h).plusMinutes(m).toLocalDateTime();
}
大黑与small白
在网页这样才对。
在IDEA也可以这样写