Skip to content

Commit

Permalink
chore: 서버 KST 타임존 수동 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
csct3434 committed Mar 22, 2024
1 parent 6c81e75 commit 5dbba05
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/today/seasoning/seasoning/SeasoningApplication.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package today.seasoning.seasoning;

import java.time.LocalDateTime;
import java.util.TimeZone;
import javax.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

@Slf4j
@EnableScheduling
@SpringBootApplication
public class SeasoningApplication {
Expand All @@ -12,4 +17,10 @@ public static void main(String[] args) {
SpringApplication.run(SeasoningApplication.class, args);
}

@PostConstruct
void setTimeZone() {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
log.info("Server Time : {}", LocalDateTime.now());
}

}

0 comments on commit 5dbba05

Please sign in to comment.