使用正确的 ZoneId。

feature/net-util
ZhouXY108 2023-06-04 04:10:50 +08:00
parent 05ce281128
commit 2c459692b6
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class DateTimeUtilTests {
@Test @Test
void testToJodaDateTime() { void testToJodaDateTime() {
DateTime jodaDateTime = DateTimeUtil.toJodaDateTime(Instant.now(), ZoneId.of("null")); DateTime jodaDateTime = DateTimeUtil.toJodaDateTime(Instant.now(), ZoneId.of("+08:00"));
log.info("jodaDateTime: {}", jodaDateTime); log.info("jodaDateTime: {}", jodaDateTime);
} }