Skip to content

Commit

Permalink
Merge pull request #110 from Team-Packman/feature/PS-91
Browse files Browse the repository at this point in the history
chore: localDate timezone 설정
  • Loading branch information
kkl4846 authored Aug 16, 2023
2 parents 79445ce + 7365d48 commit 5e4b173
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/packman/service/FolderService.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import packman.util.ResponseCode;

import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
Expand Down Expand Up @@ -266,7 +267,9 @@ public RecentCreatedListResponseDto getRecentCreatedList(Long userId) {
ListInFolderDto listInFolderDto = listInFolderDtos.get(0);

String departureDate = listInFolderDto.getDepartureDate();
LocalDate nowDate = LocalDate.now();

ZoneId koreaTimeZone = ZoneId.of("Asia/Seoul");
LocalDate nowDate = LocalDate.now(koreaTimeZone);

long remainDay = ChronoUnit.DAYS.between(nowDate, LocalDate.parse(departureDate, DateTimeFormatter.ISO_DATE));

Expand Down

0 comments on commit 5e4b173

Please # to comment.