Skip to content

Commit 648f8cb

Browse files
authored
Merge pull request #79 from nimuy99/fix/78-timezone
#78 Fix: 서버 타임존 KST로 설정
2 parents 616e6ec + 4fa4885 commit 648f8cb

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/main/java/com/memesphere/MemesphereApplication.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
package com.memesphere;
22

3+
import jakarta.annotation.PostConstruct;
34
import org.springframework.boot.SpringApplication;
45
import org.springframework.boot.autoconfigure.SpringBootApplication;
56
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
67
import org.springframework.scheduling.annotation.EnableScheduling;
78

9+
import java.util.TimeZone;
10+
811
@SpringBootApplication
912
@EnableJpaAuditing
1013
@EnableScheduling
1114
public class MemesphereApplication {
1215

16+
@PostConstruct
17+
public void started() {
18+
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
19+
}
20+
1321
public static void main(String[] args) {
1422
SpringApplication.run(MemesphereApplication.class, args);
1523
}

src/main/java/com/memesphere/domain/chartdata/repository/ChartDataRepository.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public interface ChartDataRepository extends JpaRepository<ChartData, Long> {
2828
LocalDateTime findRecordedTimeByCoinId1();
2929

3030
List<ChartData> findByMemeCoinOrderByRecordedTimeDesc(MemeCoin memeCoin);
31+
3132
//TODO: 위아래 코드 합치는 방법 찾기
3233
List<ChartData> findByMemeCoinOrderByRecordedTimeDesc(MemeCoin memeCoin, Pageable pageable);
34+
3335
}

0 commit comments

Comments
 (0)