static LocalDateTime calculateArrivalAtNY(LocalDateTime bj, int h, int m) {
ZonedDateTime zbj = bj.atZone(ZoneId.of("Asia/Shanghai"));
ZonedDateTime zbjNew = zbj.plusHours(13).plusMinutes(20);
ZonedDateTime zny = zbjNew.withZoneSameInstant(ZoneId.of("America/New_York"));
return zny.toLocalDateTime();
}
Sign in to make a reply
何霖
static LocalDateTime calculateArrivalAtNY(LocalDateTime bj, int h, int m) {
ZonedDateTime zbj = bj.atZone(ZoneId.of("Asia/Shanghai"));
ZonedDateTime zbjNew = zbj.plusHours(13).plusMinutes(20);
ZonedDateTime zny = zbjNew.withZoneSameInstant(ZoneId.of("America/New_York"));
return zny.toLocalDateTime();
}