Skip to content

Commit

Permalink
fix: 시간 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ywj9811 committed Nov 22, 2023
1 parent 86c9ceb commit 3429ab3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/postgraduate/log/mongoDB/entity/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.springframework.util.StringUtils;

import java.time.LocalDateTime;
import java.time.ZoneId;

@Document(collection = "log")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand All @@ -22,7 +23,7 @@ public class Log {
private String exceptionMessage;
private LogType logType;
@Indexed(expireAfterSeconds = 60*60*24*30) //30일
private LocalDateTime logDate = LocalDateTime.now();
private LocalDateTime logDate = LocalDateTime.now(ZoneId.of("Asia/Seoul"));

public Log(String logId, Integer executeTime, String methodName, String exceptionMessage) {
this.logId = logId;
Expand Down

0 comments on commit 3429ab3

Please sign in to comment.