From 06e001b704877811e0122db895ea5c1042503a41 Mon Sep 17 00:00:00 2001 From: mummhy0811 Date: Thu, 16 Nov 2023 14:05:08 +0900 Subject: [PATCH] Feat: set default timezone to seoul --- src/main/java/com/onestep/server/ServerApplication.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/onestep/server/ServerApplication.java b/src/main/java/com/onestep/server/ServerApplication.java index a240291..ba23ace 100644 --- a/src/main/java/com/onestep/server/ServerApplication.java +++ b/src/main/java/com/onestep/server/ServerApplication.java @@ -4,12 +4,20 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; +import javax.annotation.PostConstruct; +import java.util.TimeZone; + @EnableScheduling @SpringBootApplication public class ServerApplication { static { System.setProperty("com.amazonaws.sdk.disableEc2Metadata", "true"); } + + @PostConstruct + public void started() { + TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul")); + } public static void main(String[] args) { SpringApplication.run(ServerApplication.class, args); }