回答編集履歴
2
質問文に合わせ修正
answer
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
public static void main(String[] args) {
|
|
8
8
|
LocalDateTime now = LocalDateTime.now();
|
|
9
9
|
// 日付を +1 して時を 9、分を 0 に
|
|
10
|
-
now = now.
|
|
10
|
+
now = now = now.plusHours(15).withHour(9).withMinute(0).withSecond(0).withNano(0);
|
|
11
11
|
System.out.println(now);
|
|
12
12
|
}
|
|
13
13
|
}
|
1
修正
answer
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
public static void main(String[] args) {
|
|
8
8
|
LocalDateTime now = LocalDateTime.now();
|
|
9
9
|
// 日付を +1 して時を 9、分を 0 に
|
|
10
|
-
now = now.plusDays(1).withHour(9).withMinute(0);
|
|
10
|
+
now = now.plusDays(1).withHour(9).withMinute(0).withSecond(0).withNano(0);
|
|
11
11
|
System.out.println(now);
|
|
12
12
|
}
|
|
13
13
|
}
|